diff --git a/README.md b/README.md index cd67efd..3663877 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ > OhMyAPI == Application scaffolding for FastAPI+TortoiseORM. -OhMyAPI is a blazingly fast, async Python web application framework with batteries included. -It is built around FastAPI and TortoiseORM and is thus 100% async. +OhMyAPI is a Django-flavored web-application scaffolding framework. +It is blazingly fast, async and has batteries included. +Built around FastAPI and TortoiseORM makes it 100% async. Features: @@ -23,7 +24,7 @@ Features: **Creating a Project** ``` -pip install ohmyapi # TODO: not yet published +pip install ohmyapi ohmyapi startproject myproject cd myproject ``` @@ -93,13 +94,13 @@ router = APIRouter(prefix="/myapp") @router.get("/") async def list(): - return await Person.all() + return await Person.Schema.many.from_queryset(Person.all()) @router.get("/:id") async def get(id: int): try: - await Person.get(pk=id) + return await Person.Schema.one(Person.get(pk=id)) except DoesNotExist: raise HTTPException(status_code=404, detail="item not found")