ohmyapi 0.1.26__py3-none-any.whl → 0.1.27__py3-none-any.whl
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/core/runtime.py +4 -12
- {ohmyapi-0.1.26.dist-info → ohmyapi-0.1.27.dist-info}/METADATA +2 -3
- {ohmyapi-0.1.26.dist-info → ohmyapi-0.1.27.dist-info}/RECORD +5 -5
- {ohmyapi-0.1.26.dist-info → ohmyapi-0.1.27.dist-info}/WHEEL +0 -0
- {ohmyapi-0.1.26.dist-info → ohmyapi-0.1.27.dist-info}/entry_points.txt +0 -0
ohmyapi/core/runtime.py
CHANGED
@@ -119,26 +119,18 @@ class Project:
|
|
119
119
|
def build_aerich_command(
|
120
120
|
self, app_label: str, db_url: Optional[str] = None
|
121
121
|
) -> AerichCommand:
|
122
|
-
|
123
|
-
|
124
|
-
flat_label = app_label
|
125
|
-
else:
|
126
|
-
candidate = app_label.replace(".", "_")
|
127
|
-
if candidate in self._apps:
|
128
|
-
flat_label = candidate
|
129
|
-
else:
|
130
|
-
raise RuntimeError(f"App '{app_label}' is not registered")
|
122
|
+
if app_label not in self._apps:
|
123
|
+
raise RuntimeError(f"App '{app_label}' is not registered")
|
131
124
|
|
132
125
|
# Get a fresh copy of the config (without aerich.models anywhere)
|
133
126
|
tortoise_cfg = copy.deepcopy(self.build_tortoise_config(db_url=db_url))
|
134
127
|
|
135
128
|
# Append aerich.models to the models list of the target app only
|
136
|
-
|
137
|
-
tortoise_cfg["apps"][flat_label]["models"].append("aerich.models")
|
129
|
+
tortoise_cfg["apps"][app_label]["models"].append("aerich.models")
|
138
130
|
|
139
131
|
return AerichCommand(
|
140
132
|
tortoise_config=tortoise_cfg,
|
141
|
-
app=
|
133
|
+
app=app_label,
|
142
134
|
location=str(self.migrations_dir),
|
143
135
|
)
|
144
136
|
|
@@ -1,14 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ohmyapi
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.27
|
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
|
7
7
|
Author: Brian Wiborg
|
8
8
|
Author-email: me@brianwib.org
|
9
|
-
Requires-Python: >=3.
|
9
|
+
Requires-Python: >=3.11
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
12
11
|
Classifier: Programming Language :: Python :: 3.11
|
13
12
|
Classifier: Programming Language :: Python :: 3.12
|
14
13
|
Classifier: Programming Language :: Python :: 3.13
|
@@ -9,7 +9,7 @@ ohmyapi/builtin/demo/models.py,sha256=N3LnHLEa5wYBvaQBImCR4SdZvRYGuwM_iyLCeh9QY8
|
|
9
9
|
ohmyapi/builtin/demo/routes.py,sha256=JZbW_ZBirzNEO6PuJO_ZPV4k__cH8rvU9JN6CDhocWc,1821
|
10
10
|
ohmyapi/cli.py,sha256=dJVNgpW5S4rCc619AEEKBKuEIAmQs153Ls0ZVaea48w,4173
|
11
11
|
ohmyapi/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
ohmyapi/core/runtime.py,sha256=
|
12
|
+
ohmyapi/core/runtime.py,sha256=tdFSOu9fV2BjcE5BIfGfm3jjeGw6Tw8jCM6-hk5Be2s,9264
|
13
13
|
ohmyapi/core/scaffolding.py,sha256=SA0SYFd7VcqkOn9xuXgj-yOoVqCZMJo68GGFbm34GE4,2663
|
14
14
|
ohmyapi/core/templates/app/__init__.py.j2,sha256=QwVIQVUGZVhdH1d4NrvL7NTsK4-T4cihzYs8UVX2dt4,43
|
15
15
|
ohmyapi/core/templates/app/models.py.j2,sha256=_3w-vFJ5fgsmncsCv34k_wyCMF78jufbSSglns4gbb0,119
|
@@ -22,7 +22,7 @@ ohmyapi/db/exceptions.py,sha256=vb4IIUoeYAY6sK42zRtjMy-39IFVi_Qb6mWySTY0jYw,34
|
|
22
22
|
ohmyapi/db/model/__init__.py,sha256=k3StTNuKatpwZo_Z5JBFa-927eJrzibFE8U4SA82asc,32
|
23
23
|
ohmyapi/db/model/model.py,sha256=MQAXVDYpCjGFWfn3u2XP4Q6OZzIJrJBWOWcg5sBDhlw,2581
|
24
24
|
ohmyapi/router.py,sha256=6Exv6sVPVyiIYxxAQbxQhFRX74MKTUPWXIBwC7UZ-ww,82
|
25
|
-
ohmyapi-0.1.
|
26
|
-
ohmyapi-0.1.
|
27
|
-
ohmyapi-0.1.
|
28
|
-
ohmyapi-0.1.
|
25
|
+
ohmyapi-0.1.27.dist-info/METADATA,sha256=a9h8zsKsiutguUDcdzBZcWjxgwjBRBLbbMFGeW1n7k0,10281
|
26
|
+
ohmyapi-0.1.27.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
27
|
+
ohmyapi-0.1.27.dist-info/entry_points.txt,sha256=wb3lw8-meAlpiv1mqcQ3m25ukL7djagU_w89GkrC37k,43
|
28
|
+
ohmyapi-0.1.27.dist-info/RECORD,,
|
File without changes
|
File without changes
|