Skip to content

v3.0.0

Compare
Choose a tag to compare
@aloeci aloeci released this 07 Nov 19:15
· 52 commits to master since this release

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 and AsyncPaginate dependencies are now using the Annotated 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 the pyproject.toml.
  • The library now requires FastAPI >= 0.95.1

What's Changed

Full Changelog: v2.10.1...v3.0.0