v3.0.0
Introduce support for multiple sessions running in parallel. To configure a new separate session, you just have to set a fastapi_sqla__MY_KEY__sqlalchemy_url
environment variable and it will be configured. See the README for more details about how to use it.
Note that the default session is still configured via sqlalchemy_url
and all the existing functions default to using the default session if the key is not specified.
Breaking changes
- Remove support for configuring a separate async session with
async_sqlalchemy_url
. The supported way is now to use an async dialect in the default connection string, or use another session with the proper format. - The
Session
,AsyncSession
,Paginate
andAsyncPaginate
dependencies are now using theAnnotated
form recommended by FastAPI since version 0.95.0. This means that you'll need to change the usage of the dependencies like:session: Session = Depends()
->session: Session
. - Drop support for python versions lower than
3.9
. This was already the case since we were only testing with those versions, but the support is now explicitly removed from thepyproject.toml
. - The library now requires FastAPI
>= 0.95.1
What's Changed
- feat: support multiple sessions - DIA-61984 by @arththebird in #105
Full Changelog: v2.10.1...v3.0.0