Fastapi

Latest version: v0.111.0

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

Scan your dependencies

Page 5 of 31

0.100.0beta2

Install with:

shell
pip install --pre --upgrade fastapi pydantic


Features

✨ Beta support for Pydantic version 2 ✨

[Pydantic v2 was released a few hours ago](https://twitter.com/pydantic/status/1674820177005887508). 🎉

The final (non-beta) release of Pydantic v2 had a few minor changes. This **beta 2** of FastAPI fixes those minor changes in FastAPI (thanks Lancetnik! PR https://github.com/tiangolo/fastapi/pull/9771).

This means you can install Pydantic v2 stable, and try it with FastAPI 0.100.0 beta 2. 🎉

The next (and probably final) beta will include the latest changes in the main FastAPI branch, including OpenAPI 3.1.0. But meanwhile, with this quick fix beta you can start/keep trying FastAPI with the new Pydantic.

---

> The same details as in the previous beta release below.

This has many features:

* Improved correctness in corner cases
* Safer types
* Better performance and less energy consumption
* Better extensibility
* etc.

Check out the Pydantic migration guide: https://docs.pydantic.dev/dev-v2/migration/

**This version of FastAPI still supports Pydantic v1**.

This means that you can install the new Pydantic v2, and if something fails, you can install Pydantic v1 while you fix any problems you might have, but having the latest FastAPI.

The focus of this release is compatibility with Pydantic v1 and v2, to make sure your current apps keep working. Later there will be more focus on refactors and code improvements, and then performance improvements. Although you will probably get nice performance improvements already.

There are tests for both Pydantic v1 and v2, and test coverage is kept at 100%.

You will probably still want to **test this version** in your code even if you don't plan to migrate to Pydantic v2 yet, to ensure that the changes of FastAPI don't break your app in any way.

If you install the beta, please let me know if everything is working or if you are having issues in this discussion: https://github.com/tiangolo/fastapi/discussions/9709

0.100.0beta1

Install with:

shell
pip install --pre --upgrade fastapi pydantic


Features

✨ Beta support for Pydantic version 2 ✨

The internals of Pydantic v2 were rewritten in Rust and it's currently available in beta.

This has many features:

* Improved correctness in corner cases
* Safer types
* Better performance and less energy consumption
* Better extensibility
* etc.

Check out the Pydantic migration guide: https://docs.pydantic.dev/dev-v2/migration/

**This version of FastAPI still supports Pydantic v1**.

This means that you can install the new Pydantic v2, and if something fails, you can install Pydantic v1 while you fix any problems you might have, but having the latest FastAPI.

The focus of this release is compatibility with Pydantic v1 and v2, to make sure your current apps keep working. Later there will be more focus on refactors and code improvements, and then performance improvements. Although you will probably get nice performance improvements already.

There are tests for both Pydantic v1 and v2, and test coverage is kept at 100%.

You will probably still want to **test this version** in your code even if you don't plan to migrate to Pydantic v2 yet, to ensure that the changes of FastAPI don't break your app in any way.

If you install the beta, please let me know if everything is working or if you are having issues in this discussion: https://github.com/tiangolo/fastapi/discussions/9709

0.99.1

Not secure
Fixes

* 🐛 Fix JSON Schema accepting bools as valid JSON Schemas, e.g. `additionalProperties: false`. PR [9781](https://github.com/tiangolo/fastapi/pull/9781) by [tiangolo](https://github.com/tiangolo).

Docs

* 📝 Update source examples to use new JSON Schema examples field. PR [9776](https://github.com/tiangolo/fastapi/pull/9776) by [tiangolo](https://github.com/tiangolo).

0.99.0

Not secure
**Note**: this is the **last release before supporting Pydantic v2**. You can try out the beta with support for Pydantic v2 now, a new beta supporting Pydantic v2 with these same changes from this release will be available in the next hours/days. And the final version (0.100.0) with support for Pydantic v2 will be released in the next days (next week).

Now, back to this release (this one doesn't include the beta support for Pydantic v2).

0.98.0

Not secure
**Note**: please also help me try out the beta with support for Pydantic v2: https://github.com/tiangolo/fastapi/releases/tag/0.100.0-beta1

Now, back to this release (this one doesn't include the beta support for Pydantic v2).

Features

* ✨ Allow disabling `redirect_slashes` at the FastAPI app level. PR [3432](https://github.com/tiangolo/fastapi/pull/3432) by [cyberlis](https://github.com/cyberlis).

Docs

* 📝 Update docs on Pydantic using ujson internally. PR [5804](https://github.com/tiangolo/fastapi/pull/5804) by [mvasilkov](https://github.com/mvasilkov).
* ✏ Rewording in `docs/en/docs/tutorial/debugging.md`. PR [9581](https://github.com/tiangolo/fastapi/pull/9581) by [ivan-abc](https://github.com/ivan-abc).
* 📝 Add german blog post (Domain-driven Design mit Python und FastAPI). PR [9261](https://github.com/tiangolo/fastapi/pull/9261) by [msander](https://github.com/msander).
* ✏️ Tweak wording in `docs/en/docs/tutorial/security/index.md`. PR [9561](https://github.com/tiangolo/fastapi/pull/9561) by [jyothish-mohan](https://github.com/jyothish-mohan).
* 📝 Update `Annotated` notes in `docs/en/docs/tutorial/schema-extra-example.md`. PR [9620](https://github.com/tiangolo/fastapi/pull/9620) by [Alexandrhub](https://github.com/Alexandrhub).
* ✏️ Fix typo `Annotation` -> `Annotated` in `docs/en/docs/tutorial/query-params-str-validations.md`. PR [9625](https://github.com/tiangolo/fastapi/pull/9625) by [mccricardo](https://github.com/mccricardo).
* 📝 Use in memory database for testing SQL in docs. PR [1223](https://github.com/tiangolo/fastapi/pull/1223) by [HarshaLaxman](https://github.com/HarshaLaxman).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/tutorial/metadata.md`. PR [9681](https://github.com/tiangolo/fastapi/pull/9681) by [TabarakoAkula](https://github.com/TabarakoAkula).
* 🌐 Fix typo in Spanish translation for `docs/es/docs/tutorial/first-steps.md`. PR [9571](https://github.com/tiangolo/fastapi/pull/9571) by [lilidl-nft](https://github.com/lilidl-nft).
* 🌐 Add Russian translation for `docs/tutorial/path-operation-configuration.md`. PR [9696](https://github.com/tiangolo/fastapi/pull/9696) by [TabarakoAkula](https://github.com/TabarakoAkula).
* 🌐 Add Chinese translation for `docs/zh/docs/advanced/security/index.md`. PR [9666](https://github.com/tiangolo/fastapi/pull/9666) by [lordqyxz](https://github.com/lordqyxz).
* 🌐 Add Chinese translations for `docs/zh/docs/advanced/settings.md`. PR [9652](https://github.com/tiangolo/fastapi/pull/9652) by [ChoyeonChern](https://github.com/ChoyeonChern).
* 🌐 Add Chinese translations for `docs/zh/docs/advanced/websockets.md`. PR [9651](https://github.com/tiangolo/fastapi/pull/9651) by [ChoyeonChern](https://github.com/ChoyeonChern).
* 🌐 Add Chinese translation for `docs/zh/docs/tutorial/testing.md`. PR [9641](https://github.com/tiangolo/fastapi/pull/9641) by [wdh99](https://github.com/wdh99).
* 🌐 Add Russian translation for `docs/tutorial/extra-models.md`. PR [9619](https://github.com/tiangolo/fastapi/pull/9619) by [ivan-abc](https://github.com/ivan-abc).
* 🌐 Add Russian translation for `docs/tutorial/cors.md`. PR [9608](https://github.com/tiangolo/fastapi/pull/9608) by [ivan-abc](https://github.com/ivan-abc).
* 🌐 Add Polish translation for `docs/pl/docs/features.md`. PR [5348](https://github.com/tiangolo/fastapi/pull/5348) by [mbroton](https://github.com/mbroton).
* 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-nested-models.md`. PR [9605](https://github.com/tiangolo/fastapi/pull/9605) by [Alexandrhub](https://github.com/Alexandrhub).

Internal

* ⬆ Bump ruff from 0.0.272 to 0.0.275. PR [9721](https://github.com/tiangolo/fastapi/pull/9721) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Update uvicorn[standard] requirement from <0.21.0,>=0.12.0 to >=0.12.0,<0.23.0. PR [9463](https://github.com/tiangolo/fastapi/pull/9463) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump mypy from 1.3.0 to 1.4.0. PR [9719](https://github.com/tiangolo/fastapi/pull/9719) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Update pre-commit requirement from <3.0.0,>=2.17.0 to >=2.17.0,<4.0.0. PR [9251](https://github.com/tiangolo/fastapi/pull/9251) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6. PR [9482](https://github.com/tiangolo/fastapi/pull/9482) by [dependabot[bot]](https://github.com/apps/dependabot).
* ✏️ Fix tooltips for light/dark theme toggler in docs. PR [9588](https://github.com/tiangolo/fastapi/pull/9588) by [pankaj1707k](https://github.com/pankaj1707k).
* 🔧 Set minimal hatchling version needed to build the package. PR [9240](https://github.com/tiangolo/fastapi/pull/9240) by [mgorny](https://github.com/mgorny).
* 📝 Add repo link to PyPI. PR [9559](https://github.com/tiangolo/fastapi/pull/9559) by [JacobCoffee](https://github.com/JacobCoffee).
* ✏️ Fix typos in data for tests. PR [4958](https://github.com/tiangolo/fastapi/pull/4958) by [ryanrussell](https://github.com/ryanrussell).
* 🔧 Update sponsors, add Flint. PR [9699](https://github.com/tiangolo/fastapi/pull/9699) by [tiangolo](https://github.com/tiangolo).
* 👷 Lint in CI only once, only with one version of Python, run tests with all of them. PR [9686](https://github.com/tiangolo/fastapi/pull/9686) by [tiangolo](https://github.com/tiangolo).

0.97.0

Not secure
Features

* ✨ Add support for `dependencies` in WebSocket routes. PR [4534](https://github.com/tiangolo/fastapi/pull/4534) by [paulo-raca](https://github.com/paulo-raca).
* ✨ Add exception handler for `WebSocketRequestValidationError` (which also allows to override it). PR [6030](https://github.com/tiangolo/fastapi/pull/6030) by [kristjanvalur](https://github.com/kristjanvalur).

Refactors

* ⬆️ Upgrade and fully migrate to Ruff, remove isort, includes a couple of tweaks suggested by the new version of Ruff. PR [9660](https://github.com/tiangolo/fastapi/pull/9660) by [tiangolo](https://github.com/tiangolo).
* ♻️ Update internal type annotations and upgrade mypy. PR [9658](https://github.com/tiangolo/fastapi/pull/9658) by [tiangolo](https://github.com/tiangolo).
* ♻️ Simplify `AsyncExitStackMiddleware` as without Python 3.6 `AsyncExitStack` is always available. PR [9657](https://github.com/tiangolo/fastapi/pull/9657) by [tiangolo](https://github.com/tiangolo).

Upgrades

* ⬆️ Upgrade Black. PR [9661](https://github.com/tiangolo/fastapi/pull/9661) by [tiangolo](https://github.com/tiangolo).

Internal

* 💚 Update CI cache to fix installs when dependencies change. PR [9659](https://github.com/tiangolo/fastapi/pull/9659) by [tiangolo](https://github.com/tiangolo).
* ⬇️ Separate requirements for development into their own requirements.txt files, they shouldn't be extras. PR [9655](https://github.com/tiangolo/fastapi/pull/9655) by [tiangolo](https://github.com/tiangolo).

Page 5 of 31

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.