Fastapi

Latest version: v0.115.11

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

Scan your dependencies

Page 25 of 34

0.39.0

Not secure
* Allow path parameters to have default values (e.g. `None`) and discard them instead of raising an error.
* This allows declaring a parameter like `user_id: str = None` that can be taken from a query parameter, but the same path operation can be included in a router with a path `/users/{user_id}`, in which case will be taken from the path and will be required.
* PR [464](https://github.com/tiangolo/fastapi/pull/464) by [jonathanunderwood](https://github.com/jonathanunderwood).
* Add support for setting a `default_response_class` in the `FastAPI` instance or in `include_router`. Initial PR [467](https://github.com/tiangolo/fastapi/pull/467) by [toppk](https://github.com/toppk).
* Add support for type annotations using strings and `from __future__ import annotations`. PR [451](https://github.com/tiangolo/fastapi/pull/451) by [dmontagu](https://github.com/dmontagu).

0.38.1

Not secure
* Fix incorrect `Request` class import. PR [493](https://github.com/tiangolo/fastapi/pull/493) by [kamalgill](https://github.com/kamalgill).

0.38.0

Not secure
* Add recent articles to [External Links](https://fastapi.tiangolo.com/external-links/) and recent opinions. PR [#490](https://github.com/tiangolo/fastapi/pull/490).
* Upgrade support range for Starlette to include `0.12.8`. The new range is `>=0.11.1,<=0.12.8"`. PR [477](https://github.com/tiangolo/fastapi/pull/477) by [dmontagu](https://github.com/dmontagu).
* Upgrade support to Pydantic version 0.32.2 and update internal code to use it (breaking change). PR [463](https://github.com/tiangolo/fastapi/pull/463) by [dmontagu](https://github.com/dmontagu).

0.37.0

Not secure
* Add support for custom route classes for advanced use cases. PR [468](https://github.com/tiangolo/fastapi/pull/468) by [dmontagu](https://github.com/dmontagu).
* Allow disabling Google fonts in ReDoc. PR [481](https://github.com/tiangolo/fastapi/pull/481) by [b1-luettje](https://github.com/b1-luettje).
* Fix security issue: when returning a sub-class of a response model and using `skip_defaults` it could leak information. PR [485](https://github.com/tiangolo/fastapi/pull/485) by [dmontagu](https://github.com/dmontagu).
* Enable tests for Python 3.8-dev. PR [465](https://github.com/tiangolo/fastapi/pull/465) by [Jamim](https://github.com/Jamim).
* Add support and tests for Pydantic dataclasses in `response_model`. PR [454](https://github.com/tiangolo/fastapi/pull/454) by [dconathan](https://github.com/dconathan).
* Fix typo in OAuth2 JWT tutorial. PR [447](https://github.com/tiangolo/fastapi/pull/447) by [pablogamboa](https://github.com/pablogamboa).
* Use the `media_type` parameter in `Body()` params to set the media type in OpenAPI for `requestBody`. PR [439](https://github.com/tiangolo/fastapi/pull/439) by [divums](https://github.com/divums).
* Add article [Deploying a scikit-learn model with ONNX and FastAPI](https://medium.com/nico.axtmann95/deploying-a-scikit-learn-model-with-onnx-und-fastapi-1af398268915) by [https://www.linkedin.com/in/nico-axtmann](Nico Axtmann). PR [#438](https://github.com/tiangolo/fastapi/pull/438) by [naxty](https://github.com/naxty).
* Allow setting custom `422` (validation error) response/schema in OpenAPI.
* And use media type from response class instead of fixed `application/json` (the default).
* PR [437](https://github.com/tiangolo/fastapi/pull/437) by [divums](https://github.com/divums).
* Fix using `"default"` extra response with status codes at the same time. PR [489](https://github.com/tiangolo/fastapi/pull/489).
* Allow additional responses to use status code ranges (like `5XX` and `4XX`) and `"default"`. PR [435](https://github.com/tiangolo/fastapi/pull/435) by [divums](https://github.com/divums).

0.36.0

Not secure
* Fix implementation for `skip_defaults` when returning a Pydantic model. PR [422](https://github.com/tiangolo/fastapi/pull/422) by [dmontagu](https://github.com/dmontagu).
* Fix OpenAPI generation when using the same dependency in multiple places for the same *path operation*. PR [417](https://github.com/tiangolo/fastapi/pull/417) by [dmontagu](https://github.com/dmontagu).
* Allow having empty paths in *path operations* used with `include_router` and a `prefix`.
* This allows having a router for `/cats` and all its *path operations*, while having one of them for `/cats`.
* Now it doesn't have to be only `/cats/` (with a trailing slash).
* To use it, declare the path in the *path operation* as the empty string (`""`).
* PR [415](https://github.com/tiangolo/fastapi/pull/415) by [vitalik](https://github.com/vitalik).
* Fix mypy error after merging PR 415. PR [462](https://github.com/tiangolo/fastapi/pull/462).

0.35.0

Not secure
* Fix typo in routing `assert`. PR [419](https://github.com/tiangolo/fastapi/pull/419) by [pablogamboa](https://github.com/pablogamboa).
* Fix typo in docs. PR [411](https://github.com/tiangolo/fastapi/pull/411) by [bronsen](https://github.com/bronsen).
* Fix parsing a body type declared with `Union`. PR [400](https://github.com/tiangolo/fastapi/pull/400) by [koxudaxi](https://github.com/koxudaxi).

Page 25 of 34

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.