pypi fastapi 0.42.0

latest releases: 0.111.0, 0.111.0.dev1, 0.110.3...
4 years ago
  • Add dependencies with yield, a.k.a. exit steps, context managers, cleanup, teardown, ...
    • This allows adding extra code after a dependency is done. It can be used, for example, to close database connections.
    • Dependencies with yield can be normal or async, FastAPI will run normal dependencies in a threadpool.
    • They can be combined with normal dependencies.
    • It's possible to have arbitrary trees/levels of dependencies with yield and exit steps are handled in the correct order automatically.
    • It works by default in Python 3.7 or above. For Python 3.6, it requires the extra backport dependencies:
      • async-exit-stack
      • async-generator
    • New docs at Dependencies with yield.
    • Updated database docs SQL (Relational) Databases: Main FastAPI app.
    • PR #595.
  • Fix sitemap.xml in website. PR #598 by @samuelcolvin.

Don't miss a new fastapi release

NewReleases is sending notifications on new releases.