github fastapi/fastapi 0.100.0-beta1

latest releases: 0.115.5, 0.115.4, 0.115.3...
pre-release17 months ago

Install with:

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: #9709

Don't miss a new fastapi release

NewReleases is sending notifications on new releases.