Gino (async)
Asynchronous routes will be automatically generated when using the GinoCRUDRouter
. To use it, you must pass a
pydantic model, your SQLAlchemy Table, and the databases database.
This CRUDRouter is intended to be used with the python Gino library. An example
of how to use Gino with FastAPI can be found both
here and below.
Warning
To use the GinoCRUDRouter
, Gino and SQLAlchemy must be first installed.
Minimal Example
Below is a minimal example assuming that you have already imported and created all the required models and database connections.
router = GinoCRUDRouter(
schema=MyPydanticModel,
db=db,
db_model=MyModel
)
app.include_router(router)