ohmyapi 0.4.2__tar.gz → 0.4.4__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.
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/PKG-INFO +1 -1
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/pyproject.toml +1 -1
- ohmyapi-0.4.4/src/ohmyapi/__init__.py +1 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/runtime.py +7 -6
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/db/__init__.py +1 -0
- ohmyapi-0.4.2/src/ohmyapi/__init__.py +0 -1
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/README.md +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/__main__.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/auth/__init__.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/auth/models.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/auth/permissions.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/auth/routes.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/demo/__init__.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/demo/models.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/builtin/demo/routes.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/cli.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/__init__.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/logging.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/scaffolding.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/app/__init__.py.j2 +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/app/models.py.j2 +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/app/routes.py.j2 +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/docker/Dockerfile +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/docker/docker-compose.yml +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/project/README.md.j2 +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/project/pyproject.toml.j2 +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/core/templates/project/settings.py.j2 +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/db/exceptions.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/db/model/__init__.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/db/model/model.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/middleware/cors.py +0 -0
- {ohmyapi-0.4.2 → ohmyapi-0.4.4}/src/ohmyapi/router.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ohmyapi
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.4
|
4
4
|
Summary: Django-flavored scaffolding and management layer around FastAPI, Pydantic, TortoiseORM and Aerich migrations
|
5
5
|
License-Expression: MIT
|
6
6
|
Keywords: fastapi,tortoise,orm,pydantic,async,web-framework
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "ohmyapi"
|
3
|
-
version = "0.4.
|
3
|
+
version = "0.4.4"
|
4
4
|
description = "Django-flavored scaffolding and management layer around FastAPI, Pydantic, TortoiseORM and Aerich migrations"
|
5
5
|
license = "MIT"
|
6
6
|
keywords = ["fastapi", "tortoise", "orm", "pydantic", "async", "web-framework"]
|
@@ -0,0 +1 @@
|
|
1
|
+
__VERSION__ = "0.4.4"
|
@@ -129,7 +129,7 @@ class Project:
|
|
129
129
|
}
|
130
130
|
|
131
131
|
for app_name, app in self._apps.items():
|
132
|
-
modules = list(app.
|
132
|
+
modules = list(app._models.keys())
|
133
133
|
if modules:
|
134
134
|
config["apps"][app_name] = {
|
135
135
|
"models": modules,
|
@@ -154,7 +154,10 @@ class Project:
|
|
154
154
|
tortoise_cfg = self.build_tortoise_config(db_url=db_url)
|
155
155
|
|
156
156
|
# Prevent leaking other app's models to Aerich.
|
157
|
-
|
157
|
+
if app_label in tortoise_cfg["apps"].keys():
|
158
|
+
tortoise_cfg["apps"] = {app_label: tortoise_cfg["apps"][app_label]}
|
159
|
+
else:
|
160
|
+
tortoise_cfg["apps"] = {app_label: {"default_connection": "default", "models": []}}
|
158
161
|
|
159
162
|
# Append aerich.models to the models list of the target app only
|
160
163
|
tortoise_cfg["apps"][app_label]["models"].append("aerich.models")
|
@@ -372,9 +375,7 @@ class App:
|
|
372
375
|
for module in self._models:
|
373
376
|
for model in self._models[module]:
|
374
377
|
out.append(model)
|
375
|
-
return
|
376
|
-
module: out,
|
377
|
-
}
|
378
|
+
return out
|
378
379
|
|
379
380
|
@property
|
380
381
|
def routers(self):
|
@@ -405,7 +406,7 @@ class App:
|
|
405
406
|
"""
|
406
407
|
return {
|
407
408
|
"models": [
|
408
|
-
f"{self.name}.{m.__name__}" for m in self.
|
409
|
+
f"{self.name}.{m.__name__}" for m in self._models[f"{self.name}.models"]
|
409
410
|
],
|
410
411
|
"middlewares": self.__serialize_middleware(),
|
411
412
|
"routes": self.__serialize_router(),
|
@@ -1 +0,0 @@
|
|
1
|
-
__VERSION__ = "0.4.2"
|
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
|
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
|