ohmyapi 0.2.4__tar.gz → 0.2.5__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.
Files changed (27) hide show
  1. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/PKG-INFO +1 -1
  2. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/pyproject.toml +1 -1
  3. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/runtime.py +14 -7
  4. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/README.md +0 -0
  5. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/__init__.py +0 -0
  6. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/__main__.py +0 -0
  7. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/auth/__init__.py +0 -0
  8. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/auth/models.py +0 -0
  9. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/auth/permissions.py +0 -0
  10. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/auth/routes.py +0 -0
  11. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/demo/__init__.py +0 -0
  12. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/demo/models.py +0 -0
  13. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/builtin/demo/routes.py +0 -0
  14. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/cli.py +0 -0
  15. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/__init__.py +0 -0
  16. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/scaffolding.py +0 -0
  17. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/templates/app/__init__.py.j2 +0 -0
  18. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/templates/app/models.py.j2 +0 -0
  19. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/templates/app/routes.py.j2 +0 -0
  20. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/templates/project/README.md.j2 +0 -0
  21. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/templates/project/pyproject.toml.j2 +0 -0
  22. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/core/templates/project/settings.py.j2 +0 -0
  23. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/db/__init__.py +0 -0
  24. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/db/exceptions.py +0 -0
  25. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/db/model/__init__.py +0 -0
  26. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/db/model/model.py +0 -0
  27. {ohmyapi-0.2.4 → ohmyapi-0.2.5}/src/ohmyapi/router.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ohmyapi
3
- Version: 0.2.4
3
+ Version: 0.2.5
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.2.4"
3
+ version = "0.2.5"
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"]
@@ -81,8 +81,8 @@ class Project:
81
81
 
82
82
  # Attach routers from apps
83
83
  for app_name, app_def in self._apps.items():
84
- if app_def.router:
85
- app.include_router(app_def.router)
84
+ for router in app_def.routers:
85
+ app.include_router(router)
86
86
 
87
87
  # Startup / shutdown events
88
88
  @app.on_event("startup")
@@ -333,16 +333,23 @@ class App:
333
333
  module: out,
334
334
  }
335
335
 
336
+ @property
337
+ def routers(self):
338
+ out = []
339
+ for routes_mod in self._routers:
340
+ for r in self._routers[routes_mod]:
341
+ out.append(r)
342
+ return out
343
+
336
344
  @property
337
345
  def routes(self):
338
346
  """
339
347
  Return an APIRouter with all loaded routes.
340
348
  """
341
- router = APIRouter()
342
- for routes_mod in self._routers:
343
- for r in self._routers[routes_mod]:
344
- router.include_router(r)
345
- return router.routes
349
+ out = []
350
+ for r in self.routers:
351
+ out.extend(r.routes)
352
+ return out
346
353
 
347
354
  def dict(self) -> Dict[str, Any]:
348
355
  """
File without changes
File without changes
File without changes
File without changes
File without changes