ohmyapi 0.2.2__tar.gz → 0.2.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.
Files changed (27) hide show
  1. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/PKG-INFO +8 -7
  2. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/README.md +6 -6
  3. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/pyproject.toml +4 -2
  4. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/runtime.py +4 -3
  5. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/__init__.py +0 -0
  6. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/__main__.py +0 -0
  7. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/auth/__init__.py +0 -0
  8. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/auth/models.py +0 -0
  9. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/auth/permissions.py +0 -0
  10. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/auth/routes.py +0 -0
  11. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/demo/__init__.py +0 -0
  12. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/demo/models.py +0 -0
  13. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/builtin/demo/routes.py +0 -0
  14. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/cli.py +0 -0
  15. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/__init__.py +0 -0
  16. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/scaffolding.py +0 -0
  17. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/templates/app/__init__.py.j2 +0 -0
  18. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/templates/app/models.py.j2 +0 -0
  19. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/templates/app/routes.py.j2 +0 -0
  20. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/templates/project/README.md.j2 +0 -0
  21. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/templates/project/pyproject.toml.j2 +0 -0
  22. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/core/templates/project/settings.py.j2 +0 -0
  23. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/db/__init__.py +0 -0
  24. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/db/exceptions.py +0 -0
  25. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/db/model/__init__.py +0 -0
  26. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/db/model/model.py +0 -0
  27. {ohmyapi-0.2.2 → ohmyapi-0.2.4}/src/ohmyapi/router.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ohmyapi
3
- Version: 0.2.2
3
+ Version: 0.2.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
@@ -30,6 +30,7 @@ Requires-Dist: python-multipart ; extra == "auth"
30
30
  Requires-Dist: tortoise-orm (>=0.25.1,<0.26.0)
31
31
  Requires-Dist: typer (>=0.19.1,<0.20.0)
32
32
  Requires-Dist: uvicorn (>=0.36.0,<0.37.0)
33
+ Project-URL: Repository, https://code.c-base.org/baccenfutter/ohmyapi
33
34
  Description-Content-Type: text/markdown
34
35
 
35
36
  # OhMyAPI
@@ -65,11 +66,11 @@ pipx install ohmyapi
65
66
 
66
67
  ## Docs
67
68
 
68
- See: `docs/`
69
+ See `docs/` or:
69
70
 
70
- - [Projects](docs/projects.md)
71
- - [Apps](docs/apps.md)
72
- - [Models](docs/models.md)
73
- - [Migrations](docs/migrations.md)
74
- - [Routes](docs/routes.md)
71
+ ```
72
+ poetry run mkdocs serve
73
+ ```
74
+
75
+ Go to: [http://localhost:8000/](http://localhost:8000/)
75
76
 
@@ -31,10 +31,10 @@ pipx install ohmyapi
31
31
 
32
32
  ## Docs
33
33
 
34
- See: `docs/`
34
+ See `docs/` or:
35
35
 
36
- - [Projects](docs/projects.md)
37
- - [Apps](docs/apps.md)
38
- - [Models](docs/models.md)
39
- - [Migrations](docs/migrations.md)
40
- - [Routes](docs/routes.md)
36
+ ```
37
+ poetry run mkdocs serve
38
+ ```
39
+
40
+ Go to: [http://localhost:8000/](http://localhost:8000/)
@@ -1,13 +1,12 @@
1
1
  [project]
2
2
  name = "ohmyapi"
3
- version = "0.2.2"
3
+ version = "0.2.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"]
7
7
  authors = [
8
8
  {name = "Brian Wiborg", email = "me@brianwib.org"}
9
9
  ]
10
- repository = "https://code.c-base.org/baccenfutter/ohmyapi"
11
10
  readme = "README.md"
12
11
  requires-python = ">=3.11"
13
12
 
@@ -41,6 +40,9 @@ packages = [ { include = "ohmyapi", from = "src" } ]
41
40
  [project.scripts]
42
41
  ohmyapi = "ohmyapi.cli:app"
43
42
 
43
+ [project.urls]
44
+ repository = "https://code.c-base.org/baccenfutter/ohmyapi"
45
+
44
46
  [tool.black]
45
47
  line-length = 88
46
48
  target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
@@ -257,7 +257,9 @@ class App:
257
257
  and issubclass(value, Model)
258
258
  and not name == Model.__name__
259
259
  ):
260
- self._models[mod_name] = self._models.get(mod_name, []) + [value]
260
+ value.__module__ = value.__module__.replace("ohmyapi.builtin.", "ohmyapi_")
261
+ if value.__module__.startswith(mod_name):
262
+ self._models[mod_name] = self._models.get(mod_name, []) + [value]
261
263
 
262
264
  # if it's a package, recurse into submodules
263
265
  if hasattr(mod, "__path__"):
@@ -300,8 +302,7 @@ class App:
300
302
  for _, subname, _ in pkgutil.iter_modules(
301
303
  mod.__path__, mod.__name__ + "."
302
304
  ):
303
- submod = importlib.import_module(subname)
304
- walk(submod)
305
+ walk(subname)
305
306
 
306
307
  # Walk the walk.
307
308
  walk(mod_name)
File without changes
File without changes
File without changes
File without changes