ohmyapi 0.1.1__py3-none-any.whl → 0.1.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ohmyapi
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: A Django-like but async web-framework based on FastAPI and TortoiseORM.
5
5
  License-Expression: MIT
6
6
  Keywords: fastapi,tortoise,orm,async,web-framework
@@ -28,8 +28,9 @@ Description-Content-Type: text/markdown
28
28
 
29
29
  > OhMyAPI == Application scaffolding for FastAPI+TortoiseORM.
30
30
 
31
- OhMyAPI is a blazingly fast, async Python web application framework with batteries included.
32
- It is built around FastAPI and TortoiseORM and is thus 100% async.
31
+ OhMyAPI is a Django-flavored web-application scaffolding framework.
32
+ It is blazingly fast, async and has batteries included.
33
+ Built around FastAPI and TortoiseORM makes it 100% async.
33
34
 
34
35
  Features:
35
36
 
@@ -49,7 +50,7 @@ Features:
49
50
  **Creating a Project**
50
51
 
51
52
  ```
52
- pip install ohmyapi # TODO: not yet published
53
+ pip install ohmyapi
53
54
  ohmyapi startproject myproject
54
55
  cd myproject
55
56
  ```
@@ -119,13 +120,13 @@ router = APIRouter(prefix="/myapp")
119
120
 
120
121
  @router.get("/")
121
122
  async def list():
122
- return await Person.all()
123
+ return await Person.Schema.many.from_queryset(Person.all())
123
124
 
124
125
 
125
126
  @router.get("/:id")
126
127
  async def get(id: int):
127
128
  try:
128
- await Person.get(pk=id)
129
+ return await Person.Schema.one(Person.get(pk=id))
129
130
  except DoesNotExist:
130
131
  raise HTTPException(status_code=404, detail="item not found")
131
132
 
@@ -194,3 +195,10 @@ INSTALLED_APPS = [
194
195
  JWT_SECRET = "t0ps3cr3t"
195
196
  ```
196
197
 
198
+ Create a super-user:
199
+
200
+ ```
201
+ ohmyapi createsuperuser
202
+ ```
203
+
204
+
@@ -17,7 +17,7 @@ ohmyapi/db/migration_manager.py,sha256=dTabeDyd6ZIa0lORlKRuiLnBTcsVAgUjgrO9_bew6
17
17
  ohmyapi/db/model/__init__.py,sha256=owKYpx5a2ZFTBgBqyEKN09AvY1cSP0dy1O7d3_sUVgM,33
18
18
  ohmyapi/db/model/model.py,sha256=PSzK_d8IZQExSRuTrEyPnqfa4GENQhbBZsVxxLWTR4g,1570
19
19
  ohmyapi/router.py,sha256=RzDXrtJJrk4eWdt9qoKBfz6g0S5WZq2hDQoFy5whR6A,40
20
- ohmyapi-0.1.1.dist-info/METADATA,sha256=4U7499jLyiwuU0PfDvqJq9y1jH-LHpw3aZQ0VFydQDA,4169
21
- ohmyapi-0.1.1.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
22
- ohmyapi-0.1.1.dist-info/entry_points.txt,sha256=ZCZJLw_ojguyr1WOmb8UwHrr42hiLj6-Kzh4mMa_7Ns,44
23
- ohmyapi-0.1.1.dist-info/RECORD,,
20
+ ohmyapi-0.1.2.dist-info/METADATA,sha256=nhmQttbrHXueUVFQx8Plu0NvJ2q2BmSrbgWbDwOi-wA,4280
21
+ ohmyapi-0.1.2.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
22
+ ohmyapi-0.1.2.dist-info/entry_points.txt,sha256=ZCZJLw_ojguyr1WOmb8UwHrr42hiLj6-Kzh4mMa_7Ns,44
23
+ ohmyapi-0.1.2.dist-info/RECORD,,