Closed waketzheng closed 6 months ago
RegisterTortoise
register_tortoise
Support register in fastapi's lifespan and leave register_tortoise there to compare old version
For some running projects, people may want to only upgrade dependencies without changing any code.
While for new project, it is more flexibility to use async with format to register db.
async with
make test cd examples/fastapi && PYTHONPATH=. pytest _tests.py
RegisterTortoise
which can be used in lifespan contextregister_tortoise
to auto run in lifespan context, but echo deprecated warningDescription
Support register in fastapi's lifespan and leave
register_tortoise
there to compare old versionMotivation and Context
For some running projects, people may want to only upgrade dependencies without changing any code.
While for new project, it is more flexibility to use
async with
format to register db.How Has This Been Tested?
Checklist: