Skip to content

Glossary: Building APIs with FastAPI

yield dependency

Also written: yield, dependency with yield

A dependency written with `yield`: code before it runs before the endpoint and code after it runs once the response is done. It is used for database connections and sessions.

Where the book teaches it

Related terms

DependencySession