Skip to content

Commit 02952ff

Browse files
committed
feat: publish to PyPI
1 parent b219f68 commit 02952ff

File tree

5 files changed

+70
-1
lines changed

5 files changed

+70
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
__pycache__
44

5+
build
6+
dist
7+
fastapi_efficient_sql.egg-info
8+
59
Pipfile.lock

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 BryanLee
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# fastapi-efficient-sql
22

3+
Installed by `pip install fastapi-efficient-sql`
4+
35
## Some preparations before using efficient sql
46
```python
57
from fastapi_esql import AppMetaclass, BaseManager, BaseModel

fastapi_esql/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from .utils.decorator import timing
99
from .utils.sqlizer import RawSQL, SQLizer
1010

11-
__version__ = "0.1.0"
11+
__version__ = "0.0.1"
1212

1313
__all__ = [
1414
"AppMetaclass",

setup.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
from os import path as os_path
2+
import setuptools
3+
4+
import fastapi_esql
5+
6+
current_dir = os_path.abspath(os_path.dirname(__file__))
7+
8+
9+
def read_file(filename):
10+
with open(os_path.join(current_dir, filename), encoding="utf-8") as f:
11+
long_description = f.read()
12+
return long_description
13+
14+
15+
with open("README.md", "r") as f:
16+
long_description = f.read()
17+
18+
19+
def read_requirements(filename):
20+
return [
21+
line.strip() for line in read_file(filename).splitlines()
22+
if not line.startswith("#")
23+
]
24+
25+
26+
setuptools.setup(
27+
name="fastapi-efficient-sql",
28+
version=fastapi_esql.__version__,
29+
author="BryanLee",
30+
author_email="bryanlee@126.com",
31+
description="Generate bulk DML SQL and execute them based on `tortoise-orm` and mysql8.0+, and integrated with `fastapi`.",
32+
long_description=long_description,
33+
long_description_content_type="text/markdown",
34+
url="https://github.com/NightMarcher/fastapi-efficient-sql",
35+
packages=setuptools.find_packages(),
36+
keywords=["sql", "fastapi", "tortoise-orm", "mysql8", "bulk-operation"],
37+
install_requires=read_requirements("requirements.txt"),
38+
classifiers=[
39+
"Programming Language :: Python :: 3",
40+
"Programming Language :: Python :: 3.7",
41+
],
42+
)

0 commit comments

Comments
 (0)