Closed waketzheng closed 5 months ago
Would be nice to have this merged
Hi!
Could you please rebase it to actual develop branch
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
tortoise/contrib/fastapi/init.py | 0 | 51 | 0.0% | ||
<!-- | Total: | 0 | 51 | 0.0% | --> |
Totals | |
---|---|
Change from base Build 8850757408: | -0.5% |
Covered Lines: | 5733 |
Relevant Lines: | 6424 |
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: