xn-model 0.11.2__tar.gz → 0.11.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xn_model-0.11.2/xn_model.egg-info → xn_model-0.11.3}/PKG-INFO +2 -3
- {xn_model-0.11.2 → xn_model-0.11.3}/pyproject.toml +3 -4
- {xn_model-0.11.2 → xn_model-0.11.3}/tests/test_db.py +2 -2
- {xn_model-0.11.2 → xn_model-0.11.3}/x_model/__init__.py +4 -3
- {xn_model-0.11.2 → xn_model-0.11.3/xn_model.egg-info}/PKG-INFO +2 -3
- {xn_model-0.11.2 → xn_model-0.11.3}/xn_model.egg-info/SOURCES.txt +1 -1
- {xn_model-0.11.2 → xn_model-0.11.3}/xn_model.egg-info/requires.txt +1 -2
- {xn_model-0.11.2 → xn_model-0.11.3}/.env.sample +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/.gitignore +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/.pre-commit-config.yaml +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/README.md +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/makefile +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/setup.cfg +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/tests/__init__.py +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/x_model/field.py +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/x_model/func.py +0 -0
- /xn_model-0.11.2/x_model/model.py → /xn_model-0.11.3/x_model/models.py +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/x_model/pydantic.py +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/xn_model.egg-info/dependency_links.txt +0 -0
- {xn_model-0.11.2 → xn_model-0.11.3}/xn_model.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xn-model
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.3
|
|
4
4
|
Summary: Base model for xn-api
|
|
5
5
|
Author-email: Mike Artemiev <mixartemev@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -10,12 +10,11 @@ Keywords: tortoise,model,crud,generator,api,admin
|
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: tortoise-orm[accel,asyncpg]
|
|
13
|
-
Requires-Dist: python-dotenv
|
|
14
13
|
Provides-Extra: dev
|
|
15
14
|
Requires-Dist: pytest; extra == "dev"
|
|
15
|
+
Requires-Dist: python-dotenv; extra == "dev"
|
|
16
16
|
Requires-Dist: build; extra == "dev"
|
|
17
17
|
Requires-Dist: twine; extra == "dev"
|
|
18
|
-
Requires-Dist: setuptools_scm; extra == "dev"
|
|
19
18
|
|
|
20
19
|
## INSTALL
|
|
21
20
|
```bash
|
|
@@ -5,8 +5,7 @@ authors = [
|
|
|
5
5
|
{name = "Mike Artemiev", email = "mixartemev@gmail.com"},
|
|
6
6
|
]
|
|
7
7
|
dependencies = [
|
|
8
|
-
'tortoise-orm[accel,asyncpg]'
|
|
9
|
-
"python-dotenv"
|
|
8
|
+
'tortoise-orm[accel,asyncpg]'
|
|
10
9
|
]
|
|
11
10
|
keywords = ["tortoise", "model", "crud", "generator", "api", "admin"]
|
|
12
11
|
description = 'Base model for xn-api'
|
|
@@ -32,9 +31,9 @@ local_scheme = "no-local-version"
|
|
|
32
31
|
[project.optional-dependencies]
|
|
33
32
|
dev = [
|
|
34
33
|
"pytest",
|
|
34
|
+
"python-dotenv",
|
|
35
35
|
"build",
|
|
36
|
-
"twine"
|
|
37
|
-
"setuptools_scm",
|
|
36
|
+
"twine"
|
|
38
37
|
]
|
|
39
38
|
|
|
40
39
|
[tool.ruff]
|
|
@@ -3,7 +3,7 @@ from os import getenv as env
|
|
|
3
3
|
from dotenv import load_dotenv
|
|
4
4
|
from tortoise.backends.asyncpg import AsyncpgDBClient
|
|
5
5
|
|
|
6
|
-
from x_model import init_db,
|
|
6
|
+
from x_model import init_db, models
|
|
7
7
|
|
|
8
8
|
load_dotenv()
|
|
9
9
|
|
|
@@ -11,4 +11,4 @@ PG_DSN = f"postgres://{env('POSTGRES_USER')}:{env('POSTGRES_PASSWORD')}@{env('PO
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def test_init_db():
|
|
14
|
-
assert isinstance(run(init_db(PG_DSN,
|
|
14
|
+
assert isinstance(run(init_db(PG_DSN, models)), AsyncpgDBClient), "DB corrupt"
|
|
@@ -21,11 +21,12 @@ async def init_db(dsn: str, models: ModuleType, create_tables: bool = False) ->
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class FailReason(IntEnum):
|
|
24
|
-
|
|
24
|
+
body = 8
|
|
25
25
|
query = 9
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
path = 10
|
|
27
|
+
host = 11
|
|
28
28
|
protocol = 12
|
|
29
|
+
method = 13
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
class HTTPException(BaseHTTPException):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: xn-model
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.3
|
|
4
4
|
Summary: Base model for xn-api
|
|
5
5
|
Author-email: Mike Artemiev <mixartemev@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -10,12 +10,11 @@ Keywords: tortoise,model,crud,generator,api,admin
|
|
|
10
10
|
Requires-Python: >=3.12
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
Requires-Dist: tortoise-orm[accel,asyncpg]
|
|
13
|
-
Requires-Dist: python-dotenv
|
|
14
13
|
Provides-Extra: dev
|
|
15
14
|
Requires-Dist: pytest; extra == "dev"
|
|
15
|
+
Requires-Dist: python-dotenv; extra == "dev"
|
|
16
16
|
Requires-Dist: build; extra == "dev"
|
|
17
17
|
Requires-Dist: twine; extra == "dev"
|
|
18
|
-
Requires-Dist: setuptools_scm; extra == "dev"
|
|
19
18
|
|
|
20
19
|
## INSTALL
|
|
21
20
|
```bash
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|