5555- 🏬 Easy redis caching
5656- 👜 Easy client-side caching
5757- 🚦 ARQ integration for task queue
58- - ⚙️ Efficient querying (only queries what's needed) with support for joins
59- - ⎘ Out of the box pagination support
58+ - ⚙️ Efficient and robust queries with < a href = " https://github.com/igorbenav/fastcrud " >fastcrud</ a >
59+ - ⎘ Out of the box offset and cursor pagination support with < a href = " https://github.com/igorbenav/fastcrud " >fastcrud</ a >
6060- 🛑 Rate Limiter dependency
6161- 👮 FastAPI docs behind authentication and hidden based on the environment
6262- 🦾 Easily extendable
@@ -749,14 +749,15 @@ poetry run alembic upgrade head
749749
750750### 5.6 CRUD
751751
752- Inside ` app/crud ` , create a new ` crud_entities.py ` inheriting from ` CRUDBase ` for each new entity:
752+ Inside ` app/crud ` , create a new ` crud_entities.py ` inheriting from ` FastCRUD ` for each new entity:
753753
754754``` python
755- from app.crud.crud_base import CRUDBase
755+ from fastcrud import FastCRUD
756+
756757from app.models.entity import Entity
757758from app.schemas.entity import EntityCreateInternal, EntityUpdate, EntityUpdateInternal, EntityDelete
758759
759- CRUDEntity = CRUDBase [Entity, EntityCreateInternal, EntityUpdate, EntityUpdateInternal, EntityDelete]
760+ CRUDEntity = FastCRUD [Entity, EntityCreateInternal, EntityUpdate, EntityUpdateInternal, EntityDelete]
760761crud_entity = CRUDEntity(Entity)
761762```
762763
@@ -767,7 +768,7 @@ So, for users:
767768from app.model.user import User
768769from app.schemas.user import UserCreateInternal, UserUpdate, UserUpdateInternal, UserDelete
769770
770- CRUDUser = CRUDBase [User, UserCreateInternal, UserUpdate, UserUpdateInternal, UserDelete]
771+ CRUDUser = FastCRUD [User, UserCreateInternal, UserUpdate, UserUpdateInternal, UserDelete]
771772crud_users = CRUDUser(User)
772773```
773774
0 commit comments