Fastapi

Latest version: v0.115.11

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

Scan your dependencies

Page 13 of 34

0.84.0

Not secure
Breaking Changes

This version of FastAPI drops support for Python 3.6. 🔥 Please upgrade to a supported version of Python (3.7 or above), Python 3.6 reached the end-of-life a long time ago. 😅☠

* 🔧 Update package metadata, drop support for Python 3.6, move build internals from Flit to Hatch. PR [5240](https://github.com/tiangolo/fastapi/pull/5240) by [ofek](https://github.com/ofek).

0.83.0

Not secure
🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥

Python 3.6 reached the [end-of-life and is no longer supported by Python](https://www.python.org/downloads/release/python-3615/) since around a year ago.

You hopefully updated to a supported version of Python a while ago. If you haven't, you really should.

Features

* ✨ Add support in `jsonable_encoder` for include and exclude with dataclasses. PR [4923](https://github.com/tiangolo/fastapi/pull/4923) by [DCsunset](https://github.com/DCsunset).

Fixes

* 🐛 Fix `RuntimeError` raised when `HTTPException` has a status code with no content. PR [5365](https://github.com/tiangolo/fastapi/pull/5365) by [iudeen](https://github.com/iudeen).
* 🐛 Fix empty reponse body when default `status_code` is empty but the a `Response` parameter with `response.status_code` is set. PR [5360](https://github.com/tiangolo/fastapi/pull/5360) by [tmeckel](https://github.com/tmeckel).

Docs

* 📝 Update `SECURITY.md`. PR [5377](https://github.com/tiangolo/fastapi/pull/5377) by [Kludex](https://github.com/Kludex).

Internal

* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5352](https://github.com/tiangolo/fastapi/pull/5352) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

0.82.0

Not secure
🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥

Python 3.6 reached the [end-of-life and is no longer supported by Python](https://www.python.org/downloads/release/python-3615/) since around a year ago.

You hopefully updated to a supported version of Python a while ago. If you haven't, you really should.

Features

* ✨ Export `WebSocketState` in `fastapi.websockets`. PR [4376](https://github.com/tiangolo/fastapi/pull/4376) by [matiuszka](https://github.com/matiuszka).
* ✨ Support Python internal description on Pydantic model's docstring. PR [3032](https://github.com/tiangolo/fastapi/pull/3032) by [Kludex](https://github.com/Kludex).
* ✨ Update `ORJSONResponse` to support non `str` keys and serializing Numpy arrays. PR [3892](https://github.com/tiangolo/fastapi/pull/3892) by [baby5](https://github.com/baby5).

Fixes

* 🐛 Allow exit code for dependencies with `yield` to always execute, by removing capacity limiter for them, to e.g. allow closing DB connections without deadlocks. PR [5122](https://github.com/tiangolo/fastapi/pull/5122) by [adriangb](https://github.com/adriangb).
* 🐛 Fix FastAPI People GitHub Action: set HTTPX timeout for GraphQL query request. PR [5222](https://github.com/tiangolo/fastapi/pull/5222) by [iudeen](https://github.com/iudeen).
* 🐛 Make sure a parameter defined as required is kept required in OpenAPI even if defined as optional in another dependency. PR [4319](https://github.com/tiangolo/fastapi/pull/4319) by [cd17822](https://github.com/cd17822).
* 🐛 Fix support for path parameters in WebSockets. PR [3879](https://github.com/tiangolo/fastapi/pull/3879) by [davidbrochart](https://github.com/davidbrochart).

Docs

* ✏ Update Hypercorn link, now pointing to GitHub. PR [5346](https://github.com/tiangolo/fastapi/pull/5346) by [baconfield](https://github.com/baconfield).
* ✏ Tweak wording in `docs/en/docs/advanced/dataclasses.md`. PR [3698](https://github.com/tiangolo/fastapi/pull/3698) by [pfackeldey](https://github.com/pfackeldey).
* 📝 Add note about Python 3.10 `X | Y` operator in explanation about Response Models. PR [5307](https://github.com/tiangolo/fastapi/pull/5307) by [MendyLanda](https://github.com/MendyLanda).
* 📝 Add link to New Relic article: "How to monitor FastAPI application performance using Python agent". PR [5260](https://github.com/tiangolo/fastapi/pull/5260) by [sjyothi54](https://github.com/sjyothi54).
* 📝 Update docs for `ORJSONResponse` with details about improving performance. PR [2615](https://github.com/tiangolo/fastapi/pull/2615) by [falkben](https://github.com/falkben).
* 📝 Add docs for creating a custom Response class. PR [5331](https://github.com/tiangolo/fastapi/pull/5331) by [tiangolo](https://github.com/tiangolo).
* 📝 Add tip about using alias for form data fields. PR [5329](https://github.com/tiangolo/fastapi/pull/5329) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/features.md`. PR [5315](https://github.com/tiangolo/fastapi/pull/5315) by [Xewus](https://github.com/Xewus).
* 🌐 Update Chinese translation for `docs/zh/docs/tutorial/request-files.md`. PR [4529](https://github.com/tiangolo/fastapi/pull/4529) by [ASpathfinder](https://github.com/ASpathfinder).
* 🌐 Add Chinese translation for `docs/zh/docs/tutorial/encoder.md`. PR [4969](https://github.com/tiangolo/fastapi/pull/4969) by [Zssaer](https://github.com/Zssaer).
* 🌐 Fix MkDocs file line for Portuguese translation of `background-task.md`. PR [5242](https://github.com/tiangolo/fastapi/pull/5242) by [ComicShrimp](https://github.com/ComicShrimp).

Internal

* 👥 Update FastAPI People. PR [5347](https://github.com/tiangolo/fastapi/pull/5347) by [github-actions[bot]](https://github.com/apps/github-actions).
* ⬆ Bump dawidd6/action-download-artifact from 2.22.0 to 2.23.0. PR [5321](https://github.com/tiangolo/fastapi/pull/5321) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5318](https://github.com/tiangolo/fastapi/pull/5318) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* ✏ Fix a small code highlight line error. PR [5256](https://github.com/tiangolo/fastapi/pull/5256) by [hjlarry](https://github.com/hjlarry).
* ♻ Internal small refactor, move `operation_id` parameter position in delete method for consistency with the code. PR [4474](https://github.com/tiangolo/fastapi/pull/4474) by [hiel](https://github.com/hiel).
* 🔧 Update sponsors, disable ImgWhale. PR [5338](https://github.com/tiangolo/fastapi/pull/5338) by [tiangolo](https://github.com/tiangolo).

0.81.0

Not secure
Features

* ✨ Add ReDoc `<noscript>` warning when JS is disabled. PR [5074](https://github.com/tiangolo/fastapi/pull/5074) by [evroon](https://github.com/evroon).
* ✨ Add support for `FrozenSet` in parameters (e.g. query). PR [2938](https://github.com/tiangolo/fastapi/pull/2938) by [juntatalor](https://github.com/juntatalor).
* ✨ Allow custom middlewares to raise `HTTPException`s and propagate them. PR [2036](https://github.com/tiangolo/fastapi/pull/2036) by [ghandic](https://github.com/ghandic).
* ✨ Preserve `json.JSONDecodeError` information when handling invalid JSON in request body, to support custom exception handlers that use its information. PR [4057](https://github.com/tiangolo/fastapi/pull/4057) by [UKnowWhoIm](https://github.com/UKnowWhoIm).

Fixes

* 🐛 Fix `jsonable_encoder` for dataclasses with pydantic-compatible fields. PR [3607](https://github.com/tiangolo/fastapi/pull/3607) by [himbeles](https://github.com/himbeles).
* 🐛 Fix support for extending `openapi_extras` with parameter lists. PR [4267](https://github.com/tiangolo/fastapi/pull/4267) by [orilevari](https://github.com/orilevari).

Docs

* ✏ Fix a simple typo in `docs/en/docs/python-types.md`. PR [5193](https://github.com/tiangolo/fastapi/pull/5193) by [GlitchingCore](https://github.com/GlitchingCore).
* ✏ Fix typos in `tests/test_schema_extra_examples.py`. PR [5126](https://github.com/tiangolo/fastapi/pull/5126) by [supraaxdd](https://github.com/supraaxdd).
* ✏ Fix typos in `docs/en/docs/tutorial/path-params-numeric-validations.md`. PR [5142](https://github.com/tiangolo/fastapi/pull/5142) by [invisibleroads](https://github.com/invisibleroads).
* 📝 Add step about upgrading pip in the venv to avoid errors when installing dependencies `docs/en/docs/contributing.md`. PR [5181](https://github.com/tiangolo/fastapi/pull/5181) by [edisnake](https://github.com/edisnake).
* ✏ Reword and clarify text in tutorial `docs/en/docs/tutorial/body-nested-models.md`. PR [5169](https://github.com/tiangolo/fastapi/pull/5169) by [papb](https://github.com/papb).
* ✏ Fix minor typo in `docs/en/docs/features.md`. PR [5206](https://github.com/tiangolo/fastapi/pull/5206) by [OtherBarry](https://github.com/OtherBarry).
* ✏ Fix minor typos in `docs/en/docs/async.md`. PR [5125](https://github.com/tiangolo/fastapi/pull/5125) by [Ksenofanex](https://github.com/Ksenofanex).
* 📝 Add external link to docs: "Fastapi, Docker(Docker compose) and Postgres". PR [5033](https://github.com/tiangolo/fastapi/pull/5033) by [krishnardt](https://github.com/krishnardt).
* 📝 Simplify example for docs for Additional Responses, remove unnecessary `else`. PR [4693](https://github.com/tiangolo/fastapi/pull/4693) by [adriangb](https://github.com/adriangb).
* 📝 Update docs, compare enums with identity instead of equality. PR [4905](https://github.com/tiangolo/fastapi/pull/4905) by [MicaelJarniac](https://github.com/MicaelJarniac).
* ✏ Fix typo in `docs/en/docs/python-types.md`. PR [4886](https://github.com/tiangolo/fastapi/pull/4886) by [MicaelJarniac](https://github.com/MicaelJarniac).
* 🎨 Fix syntax highlighting in docs for OpenAPI Callbacks. PR [4368](https://github.com/tiangolo/fastapi/pull/4368) by [xncbf](https://github.com/xncbf).
* ✏ Reword confusing sentence in docs file `typo-fix-path-params-numeric-validations.md`. PR [3219](https://github.com/tiangolo/fastapi/pull/3219) by [ccrenfroe](https://github.com/ccrenfroe).
* 📝 Update docs for handling HTTP Basic Auth with `secrets.compare_digest()` to account for non-ASCII characters. PR [3536](https://github.com/tiangolo/fastapi/pull/3536) by [lewoudar](https://github.com/lewoudar).
* 📝 Update docs for testing, fix examples with relative imports. PR [5302](https://github.com/tiangolo/fastapi/pull/5302) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/index.md`. PR [5289](https://github.com/tiangolo/fastapi/pull/5289) by [impocode](https://github.com/impocode).
* 🌐 Add Russian translation for `docs/ru/docs/deployment/versions.md`. PR [4985](https://github.com/tiangolo/fastapi/pull/4985) by [emp7yhead](https://github.com/emp7yhead).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/header-params.md`. PR [4921](https://github.com/tiangolo/fastapi/pull/4921) by [batlopes](https://github.com/batlopes).
* 🌐 Update `ko/mkdocs.yml` for a missing link. PR [5020](https://github.com/tiangolo/fastapi/pull/5020) by [dalinaum](https://github.com/dalinaum).

Internal

* ⬆ Bump dawidd6/action-download-artifact from 2.21.1 to 2.22.0. PR [5258](https://github.com/tiangolo/fastapi/pull/5258) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5196](https://github.com/tiangolo/fastapi/pull/5196) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).
* 🔥 Delete duplicated tests in `tests/test_tutorial/test_sql_databases/test_sql_databases.py`. PR [5040](https://github.com/tiangolo/fastapi/pull/5040) by [raccoonyy](https://github.com/raccoonyy).
* ♻ Simplify internal RegEx in `fastapi/utils.py`. PR [5057](https://github.com/tiangolo/fastapi/pull/5057) by [pylounge](https://github.com/pylounge).
* 🔧 Fix Type hint of `auto_error` which does not need to be `Optional[bool]`. PR [4933](https://github.com/tiangolo/fastapi/pull/4933) by [DavidKimDY](https://github.com/DavidKimDY).
* 🔧 Update mypy config, use `strict = true` instead of manual configs. PR [4605](https://github.com/tiangolo/fastapi/pull/4605) by [michaeloliverx](https://github.com/michaeloliverx).
* ♻ Change a `dict()` for `{}` in `fastapi/utils.py`. PR [3138](https://github.com/tiangolo/fastapi/pull/3138) by [ShahriyarR](https://github.com/ShahriyarR).
* ♻ Move internal variable for errors in `jsonable_encoder` to put related code closer. PR [4560](https://github.com/tiangolo/fastapi/pull/4560) by [GuilleQP](https://github.com/GuilleQP).
* ♻ Simplify conditional assignment in `fastapi/dependencies/utils.py`. PR [4597](https://github.com/tiangolo/fastapi/pull/4597) by [cikay](https://github.com/cikay).
* ⬆ Upgrade version pin accepted for Flake8, for internal code, to `flake8 >=3.8.3,<6.0.0`. PR [4097](https://github.com/tiangolo/fastapi/pull/4097) by [jamescurtin](https://github.com/jamescurtin).
* 🍱 Update Jina banner, fix typo. PR [5301](https://github.com/tiangolo/fastapi/pull/5301) by [tiangolo](https://github.com/tiangolo).

0.80.0

Not secure
Breaking Changes - Fixes

* 🐛 Fix `response_model` not invalidating `None`. PR [2725](https://github.com/tiangolo/fastapi/pull/2725) by [hukkin](https://github.com/hukkin).

If you are using `response_model` with some type that doesn't include `None` but the function is returning `None`, it will now raise an internal server error, because you are returning invalid data that violates the contract in `response_model`. Before this release it would allow breaking that contract returning `None`.

For example, if you have an app like this:

Python
from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
name: str
price: Optional[float] = None
owner_ids: Optional[List[int]] = None

app = FastAPI()

app.get("/items/invalidnone", response_model=Item)
def get_invalid_none():
return None


...calling the path `/items/invalidnone` will raise an error, because `None` is not a valid type for the `response_model` declared with `Item`.

You could also be implicitly returning `None` without realizing, for example:

Python
from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
name: str
price: Optional[float] = None
owner_ids: Optional[List[int]] = None

app = FastAPI()

app.get("/items/invalidnone", response_model=Item)
def get_invalid_none():
if flag:
return {"name": "foo"}
if flag is False, at this point the function will implicitly return None


If you have *path operations* using `response_model` that need to be allowed to return `None`, make it explicit in `response_model` using `Union[Something, None]`:

Python
from typing import Union

from fastapi import FastAPI
from pydantic import BaseModel

class Item(BaseModel):
name: str
price: Optional[float] = None
owner_ids: Optional[List[int]] = None

app = FastAPI()

app.get("/items/invalidnone", response_model=Union[Item, None])
def get_invalid_none():
return None


This way the data will be correctly validated, you won't have an internal server error, and the documentation will also reflect that this *path operation* could return `None` (or `null` in JSON).

Fixes

* ⬆ Upgrade Swagger UI copy of `oauth2-redirect.html` to include fixes for flavors of authorization code flows in Swagger UI. PR [3439](https://github.com/tiangolo/fastapi/pull/3439) initial PR by [koonpeng](https://github.com/koonpeng).
* ♻ Strip empty whitespace from description extracted from docstrings. PR [2821](https://github.com/tiangolo/fastapi/pull/2821) by [and-semakin](https://github.com/and-semakin).
* 🐛 Fix cached dependencies when using a dependency in `Security()` and other places (e.g. `Depends()`) with different OAuth2 scopes. PR [2945](https://github.com/tiangolo/fastapi/pull/2945) by [laggardkernel](https://github.com/laggardkernel).
* 🎨 Update type annotations for `response_model`, allow things like `Union[str, None]`. PR [5294](https://github.com/tiangolo/fastapi/pull/5294) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Fix typos in German translation for `docs/de/docs/features.md`. PR [4533](https://github.com/tiangolo/fastapi/pull/4533) by [0xflotus](https://github.com/0xflotus).
* 🌐 Add missing navigator for `encoder.md` in Korean translation. PR [5238](https://github.com/tiangolo/fastapi/pull/5238) by [joonas-yoon](https://github.com/joonas-yoon).
* (Empty PR merge by accident) [4913](https://github.com/tiangolo/fastapi/pull/4913).

0.79.1

Not secure
Fixes

* 🐛 Fix `jsonable_encoder` using `include` and `exclude` parameters for non-Pydantic objects. PR [2606](https://github.com/tiangolo/fastapi/pull/2606) by [xaviml](https://github.com/xaviml).
* 🐛 Fix edge case with repeated aliases names not shown in OpenAPI. PR [2351](https://github.com/tiangolo/fastapi/pull/2351) by [klaa97](https://github.com/klaa97).
* 📝 Add misc dependency installs to tutorial docs. PR [2126](https://github.com/tiangolo/fastapi/pull/2126) by [TeoZosa](https://github.com/TeoZosa).

Docs

* 📝 Add note giving credit for illustrations to [Ketrina Thompson](https://www.instagram.com/ketrinadrawsalot/). PR [#5284](https://github.com/tiangolo/fastapi/pull/5284) by [tiangolo](https://github.com/tiangolo).
* ✏ Fix typo in `python-types.md`. PR [5116](https://github.com/tiangolo/fastapi/pull/5116) by [Kludex](https://github.com/Kludex).
* ✏ Fix typo in `docs/en/docs/python-types.md`. PR [5007](https://github.com/tiangolo/fastapi/pull/5007) by [atiabbz](https://github.com/atiabbz).
* 📝 Remove unneeded Django/Flask references from async topic intro. PR [5280](https://github.com/tiangolo/fastapi/pull/5280) by [carltongibson](https://github.com/carltongibson).
* ✨ Add illustrations for Concurrent burgers and Parallel burgers. PR [5277](https://github.com/tiangolo/fastapi/pull/5277) by [tiangolo](https://github.com/tiangolo). Updated docs at: [Concurrency and Burgers](https://fastapi.tiangolo.com/async/#concurrency-and-burgers).

Translations

* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/query-params.md`. PR [4775](https://github.com/tiangolo/fastapi/pull/4775) by [batlopes](https://github.com/batlopes).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/security/first-steps.md`. PR [4954](https://github.com/tiangolo/fastapi/pull/4954) by [FLAIR7](https://github.com/FLAIR7).
* 🌐 Add translation for `docs/zh/docs/advanced/response-cookies.md`. PR [4638](https://github.com/tiangolo/fastapi/pull/4638) by [zhangbo2012](https://github.com/zhangbo2012).
* 🌐 Add French translation for `docs/fr/docs/deployment/index.md`. PR [3689](https://github.com/tiangolo/fastapi/pull/3689) by [rjNemo](https://github.com/rjNemo).
* 🌐 Add Portuguese translation for `tutorial/handling-errors.md`. PR [4769](https://github.com/tiangolo/fastapi/pull/4769) by [frnsimoes](https://github.com/frnsimoes).
* 🌐 Add French translation for `docs/fr/docs/history-design-future.md`. PR [3451](https://github.com/tiangolo/fastapi/pull/3451) by [rjNemo](https://github.com/rjNemo).
* 🌐 Add Russian translation for `docs/ru/docs/tutorial/background-tasks.md`. PR [4854](https://github.com/tiangolo/fastapi/pull/4854) by [AdmiralDesu](https://github.com/AdmiralDesu).
* 🌐 Add Chinese translation for `docs/tutorial/security/first-steps.md`. PR [3841](https://github.com/tiangolo/fastapi/pull/3841) by [jaystone776](https://github.com/jaystone776).
* 🌐 Add Japanese translation for `docs/ja/docs/advanced/nosql-databases.md`. PR [4205](https://github.com/tiangolo/fastapi/pull/4205) by [sUeharaE4](https://github.com/sUeharaE4).
* 🌐 Add Indonesian translation for `docs/id/docs/tutorial/index.md`. PR [4705](https://github.com/tiangolo/fastapi/pull/4705) by [bas-baskara](https://github.com/bas-baskara).
* 🌐 Add Persian translation for `docs/fa/docs/index.md` and tweak right-to-left CSS. PR [2395](https://github.com/tiangolo/fastapi/pull/2395) by [mohsen-mahmoodi](https://github.com/mohsen-mahmoodi).

Internal

* 🔧 Update Jina sponsorship. PR [5283](https://github.com/tiangolo/fastapi/pull/5283) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Jina sponsorship. PR [5272](https://github.com/tiangolo/fastapi/pull/5272) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors, Striveworks badge. PR [5179](https://github.com/tiangolo/fastapi/pull/5179) by [tiangolo](https://github.com/tiangolo).

Page 13 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.