Fastapi

Latest version: v0.115.11

Safety actively analyzes 714860 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 34

0.109.0

Not secure
Features

* ✨ Add support for Python 3.12. PR [10666](https://github.com/tiangolo/fastapi/pull/10666) by [Jamim](https://github.com/Jamim).

Upgrades

* ⬆️ Upgrade Starlette to `>=0.29.0,<0.33.0`, update docs and usage of templates with new Starlette arguments. Remove pin of AnyIO `>=3.7.1,<4.0.0`, add support for AnyIO 4.x.x. PR [10846](https://github.com/tiangolo/fastapi/pull/10846) by [tiangolo](https://github.com/tiangolo).

Docs

* ✏️ Fix typo in `docs/en/docs/alternatives.md`. PR [10931](https://github.com/tiangolo/fastapi/pull/10931) by [s111d](https://github.com/s111d).
* 📝 Replace `email` with `username` in `docs_src/security/tutorial007` code examples. PR [10649](https://github.com/tiangolo/fastapi/pull/10649) by [nilslindemann](https://github.com/nilslindemann).
* 📝 Add VS Code tutorial link. PR [10592](https://github.com/tiangolo/fastapi/pull/10592) by [nilslindemann](https://github.com/nilslindemann).
* 📝 Add notes about Pydantic v2's new `.model_dump()`. PR [10929](https://github.com/tiangolo/fastapi/pull/10929) by [tiangolo](https://github.com/tiangolo).
* 📝 Fix broken link in `docs/en/docs/tutorial/sql-databases.md`. PR [10765](https://github.com/tiangolo/fastapi/pull/10765) by [HurSungYun](https://github.com/HurSungYun).
* 📝 Add External Link: FastAPI application monitoring made easy. PR [10917](https://github.com/tiangolo/fastapi/pull/10917) by [tiangolo](https://github.com/tiangolo).
* ✨ Generate automatic language names for docs translations. PR [5354](https://github.com/tiangolo/fastapi/pull/5354) by [jakul](https://github.com/jakul).
* ✏️ Fix typos in `docs/en/docs/alternatives.md` and `docs/en/docs/tutorial/dependencies/index.md`. PR [10906](https://github.com/tiangolo/fastapi/pull/10906) by [s111d](https://github.com/s111d).
* ✏️ Fix typos in `docs/en/docs/tutorial/dependencies/dependencies-with-yield.md`. PR [10834](https://github.com/tiangolo/fastapi/pull/10834) by [Molkree](https://github.com/Molkree).
* 📝 Add article: "Building a RESTful API with FastAPI: Secure Signup and Login Functionality Included". PR [9733](https://github.com/tiangolo/fastapi/pull/9733) by [dxphilo](https://github.com/dxphilo).
* 📝 Add warning about lifecycle events with `AsyncClient`. PR [4167](https://github.com/tiangolo/fastapi/pull/4167) by [andrew-chang-dewitt](https://github.com/andrew-chang-dewitt).
* ✏️ Fix typos in `/docs/reference/exceptions.md` and `/en/docs/reference/status.md`. PR [10809](https://github.com/tiangolo/fastapi/pull/10809) by [clarencepenz](https://github.com/clarencepenz).
* ✏️ Fix typo in `openapi-callbacks.md`. PR [10673](https://github.com/tiangolo/fastapi/pull/10673) by [kayjan](https://github.com/kayjan).
* ✏️ Fix typo in `fastapi/routing.py` . PR [10520](https://github.com/tiangolo/fastapi/pull/10520) by [sepsh](https://github.com/sepsh).
* 📝 Replace HTTP code returned in case of existing user error in docs for testing. PR [4482](https://github.com/tiangolo/fastapi/pull/4482) by [TristanMarion](https://github.com/TristanMarion).
* 📝 Add blog for FastAPI & Supabase. PR [6018](https://github.com/tiangolo/fastapi/pull/6018) by [theinfosecguy](https://github.com/theinfosecguy).
* 📝 Update example source files for SQL databases with SQLAlchemy. PR [9508](https://github.com/tiangolo/fastapi/pull/9508) by [s-mustafa](https://github.com/s-mustafa).
* 📝 Update code examples in docs for body, replace name `create_item` with `update_item` when appropriate. PR [5913](https://github.com/tiangolo/fastapi/pull/5913) by [OttoAndrey](https://github.com/OttoAndrey).
* ✏️ Fix typo in dependencies with yield source examples. PR [10847](https://github.com/tiangolo/fastapi/pull/10847) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Bengali translation for `docs/bn/docs/index.md`. PR [9177](https://github.com/tiangolo/fastapi/pull/9177) by [Fahad-Md-Kamal](https://github.com/Fahad-Md-Kamal).
* ✏️ Update Python version in `index.md` in several languages. PR [10711](https://github.com/tiangolo/fastapi/pull/10711) by [tamago3keran](https://github.com/tamago3keran).
* 🌐 Add Russian translation for `docs/ru/docs/tutorial/request-forms-and-files.md`. PR [10347](https://github.com/tiangolo/fastapi/pull/10347) by [AlertRED](https://github.com/AlertRED).
* 🌐 Add Ukrainian translation for `docs/uk/docs/index.md`. PR [10362](https://github.com/tiangolo/fastapi/pull/10362) by [rostik1410](https://github.com/rostik1410).
* ✏️ Update Python version in `docs/ko/docs/index.md`. PR [10680](https://github.com/tiangolo/fastapi/pull/10680) by [Eeap](https://github.com/Eeap).
* 🌐 Add Persian translation for `docs/fa/docs/features.md`. PR [5887](https://github.com/tiangolo/fastapi/pull/5887) by [amirilf](https://github.com/amirilf).
* 🌐 Add Chinese translation for `docs/zh/docs/advanced/additional-responses.md`. PR [10325](https://github.com/tiangolo/fastapi/pull/10325) by [ShuibeiC](https://github.com/ShuibeiC).
* 🌐 Fix typos in Russian translations for `docs/ru/docs/tutorial/background-tasks.md`, `docs/ru/docs/tutorial/body-nested-models.md`, `docs/ru/docs/tutorial/debugging.md`, `docs/ru/docs/tutorial/testing.md`. PR [10311](https://github.com/tiangolo/fastapi/pull/10311) by [AlertRED](https://github.com/AlertRED).
* 🌐 Add Russian translation for `docs/ru/docs/tutorial/request-files.md`. PR [10332](https://github.com/tiangolo/fastapi/pull/10332) by [AlertRED](https://github.com/AlertRED).
* 🌐 Add Chinese translation for `docs/zh/docs/deployment/server-workers.md`. PR [10292](https://github.com/tiangolo/fastapi/pull/10292) by [xzmeng](https://github.com/xzmeng).
* 🌐 Add Chinese translation for `docs/zh/docs/deployment/cloud.md`. PR [10291](https://github.com/tiangolo/fastapi/pull/10291) by [xzmeng](https://github.com/xzmeng).
* 🌐 Add Chinese translation for `docs/zh/docs/deployment/manually.md`. PR [10279](https://github.com/tiangolo/fastapi/pull/10279) by [xzmeng](https://github.com/xzmeng).
* 🌐 Add Chinese translation for `docs/zh/docs/deployment/https.md`. PR [10277](https://github.com/tiangolo/fastapi/pull/10277) by [xzmeng](https://github.com/xzmeng).
* 🌐 Add Chinese translation for `docs/zh/docs/deployment/index.md`. PR [10275](https://github.com/tiangolo/fastapi/pull/10275) by [xzmeng](https://github.com/xzmeng).
* 🌐 Add German translation for `docs/de/docs/tutorial/first-steps.md`. PR [9530](https://github.com/tiangolo/fastapi/pull/9530) by [fhabers21](https://github.com/fhabers21).
* 🌐 Update Turkish translation for `docs/tr/docs/index.md`. PR [10444](https://github.com/tiangolo/fastapi/pull/10444) by [hasansezertasan](https://github.com/hasansezertasan).
* 🌐 Add Chinese translation for `docs/zh/docs/learn/index.md`. PR [10479](https://github.com/tiangolo/fastapi/pull/10479) by [KAZAMA-DREAM](https://github.com/KAZAMA-DREAM).
* 🌐 Add Russian translation for `docs/ru/docs/learn/index.md`. PR [10539](https://github.com/tiangolo/fastapi/pull/10539) by [AlertRED](https://github.com/AlertRED).
* 🌐 Update SQLAlchemy instruction in Chinese translation `docs/zh/docs/tutorial/sql-databases.md`. PR [9712](https://github.com/tiangolo/fastapi/pull/9712) by [Royc30ne](https://github.com/Royc30ne).
* 🌐 Add Turkish translation for `docs/tr/docs/external-links.md`. PR [10549](https://github.com/tiangolo/fastapi/pull/10549) by [hasansezertasan](https://github.com/hasansezertasan).
* 🌐 Add Spanish translation for `docs/es/docs/learn/index.md`. PR [10885](https://github.com/tiangolo/fastapi/pull/10885) by [pablocm83](https://github.com/pablocm83).
* 🌐 Add Ukrainian translation for `docs/uk/docs/tutorial/body-fields.md`. PR [10670](https://github.com/tiangolo/fastapi/pull/10670) by [ArtemKhymenko](https://github.com/ArtemKhymenko).
* 🌐 Add Hungarian translation for `/docs/hu/docs/index.md`. PR [10812](https://github.com/tiangolo/fastapi/pull/10812) by [takacs](https://github.com/takacs).
* 🌐 Add Turkish translation for `docs/tr/docs/newsletter.md`. PR [10550](https://github.com/tiangolo/fastapi/pull/10550) by [hasansezertasan](https://github.com/hasansezertasan).
* 🌐 Add Spanish translation for `docs/es/docs/help/index.md`. PR [10907](https://github.com/tiangolo/fastapi/pull/10907) by [pablocm83](https://github.com/pablocm83).
* 🌐 Add Spanish translation for `docs/es/docs/about/index.md`. PR [10908](https://github.com/tiangolo/fastapi/pull/10908) by [pablocm83](https://github.com/pablocm83).
* 🌐 Add Spanish translation for `docs/es/docs/resources/index.md`. PR [10909](https://github.com/tiangolo/fastapi/pull/10909) by [pablocm83](https://github.com/pablocm83).

Internal

* 👥 Update FastAPI People. PR [10871](https://github.com/tiangolo/fastapi/pull/10871) by [tiangolo](https://github.com/tiangolo).
* 👷 Upgrade custom GitHub Action comment-docs-preview-in-pr. PR [10916](https://github.com/tiangolo/fastapi/pull/10916) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade GitHub Action latest-changes. PR [10915](https://github.com/tiangolo/fastapi/pull/10915) by [tiangolo](https://github.com/tiangolo).
* 👷 Upgrade GitHub Action label-approved. PR [10913](https://github.com/tiangolo/fastapi/pull/10913) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade GitHub Action label-approved. PR [10905](https://github.com/tiangolo/fastapi/pull/10905) by [tiangolo](https://github.com/tiangolo).

0.108.0

Not secure
Upgrades

* ⬆️ Upgrade Starlette to `>=0.29.0,<0.33.0`, update docs and usage of templates with new Starlette arguments. PR [10846](https://github.com/tiangolo/fastapi/pull/10846) by [tiangolo](https://github.com/tiangolo).

0.107.0

Not secure
Upgrades

* ⬆️ Upgrade Starlette to 0.28.0. PR [9636](https://github.com/tiangolo/fastapi/pull/9636) by [adriangb](https://github.com/adriangb).

Docs

* 📝 Add docs: Node.js script alternative to update OpenAPI for generated clients. PR [10845](https://github.com/tiangolo/fastapi/pull/10845) by [alejsdev](https://github.com/alejsdev).
* 📝 Restructure Docs section in Contributing page. PR [10844](https://github.com/tiangolo/fastapi/pull/10844) by [alejsdev](https://github.com/alejsdev).

0.106.0

Not secure
Breaking Changes

Using resources from dependencies with `yield` in background tasks is no longer supported.

This change is what supports the new features, read below. 🤓

Dependencies with `yield`, `HTTPException` and Background Tasks

Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉

Read the new docs here: [Dependencies with `yield` and `HTTPException`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#dependencies-with-yield-and-httpexception).

Python
from fastapi import Depends, FastAPI, HTTPException
from typing_extensions import Annotated

app = FastAPI()


data = {
"plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
"portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
}


class OwnerError(Exception):
pass


def get_username():
try:
yield "Rick"
except OwnerError as e:
raise HTTPException(status_code=400, detail=f"Onwer error: {e}")


app.get("/items/{item_id}")
def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
if item_id not in data:
raise HTTPException(status_code=404, detail="Item not found")
item = data[item_id]
if item["owner"] != username:
raise OwnerError(username)
return item


---

Before FastAPI 0.106.0, raising exceptions after `yield` was not possible, the exit code in dependencies with `yield` was executed *after* the response was sent, so [Exception Handlers](https://fastapi.tiangolo.com/tutorial/handling-errors/#install-custom-exception-handlers) would have already run.

This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished.

Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0.

Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).

If you used to rely on this behavior, now you should create the resources for background tasks inside the background task itself, and use internally only data that doesn't depend on the resources of dependencies with `yield`.

For example, instead of using the same database session, you would create a new database session inside of the background task, and you would obtain the objects from the database using this new session. And then instead of passing the object from the database as a parameter to the background task function, you would pass the ID of that object and then obtain the object again inside the background task function.

The sequence of execution before FastAPI 0.106.0 was like the diagram in the [Release Notes for FastAPI 0.106.0](https://fastapi.tiangolo.com/release-notes/#01060).

The new execution flow can be found in the docs: [Execution of dependencies with `yield`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#execution-of-dependencies-with-yield).

0.105.0

Not secure
Features

* ✨ Add support for multiple Annotated annotations, e.g. `Annotated[str, Field(), Query()]`. PR [10773](https://github.com/tiangolo/fastapi/pull/10773) by [tiangolo](https://github.com/tiangolo).

Refactors

* 🔥 Remove unused NoneType. PR [10774](https://github.com/tiangolo/fastapi/pull/10774) by [tiangolo](https://github.com/tiangolo).

Docs

* 📝 Tweak default suggested configs for generating clients. PR [10736](https://github.com/tiangolo/fastapi/pull/10736) by [tiangolo](https://github.com/tiangolo).

Internal

* 🔧 Update sponsors, add Scalar. PR [10728](https://github.com/tiangolo/fastapi/pull/10728) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, add PropelAuth. PR [10760](https://github.com/tiangolo/fastapi/pull/10760) by [tiangolo](https://github.com/tiangolo).
* 👷 Update build docs, verify README on CI. PR [10750](https://github.com/tiangolo/fastapi/pull/10750) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, remove Fern. PR [10729](https://github.com/tiangolo/fastapi/pull/10729) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, add Codacy. PR [10677](https://github.com/tiangolo/fastapi/pull/10677) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, add Reflex. PR [10676](https://github.com/tiangolo/fastapi/pull/10676) by [tiangolo](https://github.com/tiangolo).
* 📝 Update release notes, move and check latest-changes. PR [10588](https://github.com/tiangolo/fastapi/pull/10588) by [tiangolo](https://github.com/tiangolo).
* 👷 Upgrade latest-changes GitHub Action. PR [10587](https://github.com/tiangolo/fastapi/pull/10587) by [tiangolo](https://github.com/tiangolo).

0.104.1

Not secure
Fixes

* 📌 Pin Swagger UI version to 5.9.0 temporarily to handle a bug crashing it in 5.9.1. PR [10529](https://github.com/tiangolo/fastapi/pull/10529) by [alejandraklachquin](https://github.com/alejandraklachquin).
* This is not really a bug in FastAPI but in Swagger UI, nevertheless pinning the version will work while a solution is found on the [Swagger UI side](https://github.com/swagger-api/swagger-ui/issues/9337).

Docs

* 📝 Update data structure and render for external-links. PR [10495](https://github.com/tiangolo/fastapi/pull/10495) by [tiangolo](https://github.com/tiangolo).
* ✏️ Fix link to SPDX license identifier in `docs/en/docs/tutorial/metadata.md`. PR [10433](https://github.com/tiangolo/fastapi/pull/10433) by [worldworm](https://github.com/worldworm).
* 📝 Update example validation error from Pydantic v1 to match Pydantic v2 in `docs/en/docs/tutorial/path-params.md`. PR [10043](https://github.com/tiangolo/fastapi/pull/10043) by [giuliowaitforitdavide](https://github.com/giuliowaitforitdavide).
* ✏️ Fix typos in emoji docs and in some source examples. PR [10438](https://github.com/tiangolo/fastapi/pull/10438) by [afuetterer](https://github.com/afuetterer).
* ✏️ Fix typo in `docs/en/docs/reference/dependencies.md`. PR [10465](https://github.com/tiangolo/fastapi/pull/10465) by [suravshresth](https://github.com/suravshresth).
* ✏️ Fix typos and rewordings in `docs/en/docs/tutorial/body-nested-models.md`. PR [10468](https://github.com/tiangolo/fastapi/pull/10468) by [yogabonito](https://github.com/yogabonito).
* 📝 Update docs, remove references to removed `pydantic.Required` in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [10469](https://github.com/tiangolo/fastapi/pull/10469) by [yogabonito](https://github.com/yogabonito).
* ✏️ Fix typo in `docs/en/docs/reference/index.md`. PR [10467](https://github.com/tiangolo/fastapi/pull/10467) by [tarsil](https://github.com/tarsil).
* 🔥 Remove unnecessary duplicated docstrings. PR [10484](https://github.com/tiangolo/fastapi/pull/10484) by [tiangolo](https://github.com/tiangolo).

Internal

* ✏️ Update Pydantic links to dotenv support. PR [10511](https://github.com/tiangolo/fastapi/pull/10511) by [White-Mask](https://github.com/White-Mask).
* ✏️ Update links in `docs/en/docs/async.md` and `docs/zh/docs/async.md` to make them relative. PR [10498](https://github.com/tiangolo/fastapi/pull/10498) by [hasnatsajid](https://github.com/hasnatsajid).
* ✏️ Fix links in `docs/em/docs/async.md`. PR [10507](https://github.com/tiangolo/fastapi/pull/10507) by [hasnatsajid](https://github.com/hasnatsajid).
* ✏️ Fix typo in `docs/em/docs/index.md`, Python 3.8. PR [10521](https://github.com/tiangolo/fastapi/pull/10521) by [kerriop](https://github.com/kerriop).
* ⬆ Bump pillow from 9.5.0 to 10.1.0. PR [10446](https://github.com/tiangolo/fastapi/pull/10446) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Update mkdocs-material requirement from <9.0.0,>=8.1.4 to >=8.1.4,<10.0.0. PR [5862](https://github.com/tiangolo/fastapi/pull/5862) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump mkdocs-material from 9.1.21 to 9.4.7. PR [10545](https://github.com/tiangolo/fastapi/pull/10545) by [dependabot[bot]](https://github.com/apps/dependabot).
* 👷 Install MkDocs Material Insiders only when secrets are available, for Dependabot. PR [10544](https://github.com/tiangolo/fastapi/pull/10544) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors badges, Databento. PR [10519](https://github.com/tiangolo/fastapi/pull/10519) by [tiangolo](https://github.com/tiangolo).
* 👷 Adopt Ruff format. PR [10517](https://github.com/tiangolo/fastapi/pull/10517) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add `CITATION.cff` file for academic citations. PR [10496](https://github.com/tiangolo/fastapi/pull/10496) by [tiangolo](https://github.com/tiangolo).
* 🐛 Fix overriding MKDocs theme lang in hook. PR [10490](https://github.com/tiangolo/fastapi/pull/10490) by [tiangolo](https://github.com/tiangolo).
* 🔥 Drop/close Gitter chat. Questions should go to GitHub Discussions, free conversations to Discord.. PR [10485](https://github.com/tiangolo/fastapi/pull/10485) by [tiangolo](https://github.com/tiangolo).

Page 6 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.