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.