https://fastapi.tiangolo.com/release-notes/ [ ] [ ] Skip to content Follow @fastapi on Twitter to stay updated Subscribe to the FastAPI and friends newsletter You can now sponsor FastAPI sponsor [cryptapi-b] sponsor [platform-s] logo FastAPI Release Notes ( ) ( ) * en - English * de * * es - espanol * fa * fr - francais * he * id * ja - Ri Ben Yu * ko - hangugeo * pl * pt - portugues * ru - russkii iazyk * tr - Turkce * zh - Yi Yu [ ] Initializing search tiangolo/fastapi logo FastAPI tiangolo/fastapi * FastAPI * [ ] Languages Languages + en + de + em + es + fa + fr + he + id + ja + ko + pl + pt + ru + tr + zh * Features * FastAPI People * Python Types Intro * [ ] Tutorial - User Guide Tutorial - User Guide + First Steps + Path Parameters + Query Parameters + Request Body + Query Parameters and String Validations + Path Parameters and Numeric Validations + Body - Multiple Parameters + Body - Fields + Body - Nested Models + Declare Request Example Data + Extra Data Types + Cookie Parameters + Header Parameters + Response Model - Return Type + Extra Models + Response Status Code + Form Data + Request Files + Request Forms and Files + Handling Errors + Path Operation Configuration + JSON Compatible Encoder + Body - Updates + [ ] Dependencies Dependencies o Classes as Dependencies o Sub-dependencies o Dependencies in path operation decorators o Global Dependencies o Dependencies with yield + [ ] Security Security o Security - First Steps o Get Current User o Simple OAuth2 with Password and Bearer o OAuth2 with Password (and hashing), Bearer with JWT tokens + Middleware + CORS (Cross-Origin Resource Sharing) + SQL (Relational) Databases + Bigger Applications - Multiple Files + Background Tasks + Metadata and Docs URLs + Static Files + Testing + Debugging * [ ] Advanced User Guide Advanced User Guide + Path Operation Advanced Configuration + Additional Status Codes + Return a Response Directly + Custom Response - HTML, Stream, File, others + Additional Responses in OpenAPI + Response Cookies + Response Headers + Response - Change Status Code + Advanced Dependencies + [ ] Advanced Security Advanced Security o OAuth2 scopes o HTTP Basic Auth + Using the Request Directly + Using Dataclasses + Advanced Middleware + SQL (Relational) Databases with Peewee + Async SQL (Relational) Databases + NoSQL (Distributed / Big Data) Databases + Sub Applications - Mounts + Behind a Proxy + Templates + GraphQL + WebSockets + Lifespan Events + Custom Request and APIRoute class + Testing WebSockets + Testing Events: startup - shutdown + Testing Dependencies with Overrides + Testing a Database + Async Tests + Settings and Environment Variables + Conditional OpenAPI + Extending OpenAPI + OpenAPI Callbacks + OpenAPI Webhooks + Including WSGI - Flask, Django, others + Generate Clients * Concurrency and async / await * [ ] Deployment Deployment + About FastAPI versions + About HTTPS + Run a Server Manually - Uvicorn + Deployments Concepts + Deploy FastAPI on Deta Space + Server Workers - Gunicorn with Uvicorn + FastAPI in Containers - Docker * Project Generation - Template * Alternatives, Inspiration and Comparisons * History, Design and Future * External Links and Articles * Benchmarks * Help FastAPI - Get Help * FastAPI and friends newsletter * Development - Contributing * [ ] Release Notes Release Notes Table of contents + Latest Changes + 0.100.0 o Migration o Pydantic v1 o Changes + 0.99.1 o Fixes o Docs + 0.99.0 o Features o Docs o Translations o Internal + 0.98.0 o Features o Docs o Translations o Internal + 0.97.0 o Features o Refactors o Upgrades o Internal + 0.96.1 o Fixes o Upgrades o Refactors o Docs o Translations o Internal + 0.96.0 o Features o Docs o Translations o Internal + 0.95.2 o Translations o Internal + 0.95.1 o Fixes o Docs o Translations o Internal + 0.95.0 o Highlights o Features o Docs + 0.94.1 o Fixes + 0.94.0 o Upgrades o Docs o Translations o Internal + 0.93.0 o Features o Docs o Translations o Internal + 0.92.0 o Upgrades + 0.91.0 o Upgrades + 0.90.1 o Upgrades o Docs o Translations o Internal + 0.90.0 o Upgrades o Docs o Translations o Internal + 0.89.1 o Fixes o Docs o Translations + 0.89.0 o Features o Docs o Translations o Internal + 0.88.0 o Upgrades o Docs o Translations o Internal + 0.87.0 o Features o Docs o Translations o Internal + 0.86.0 o Features o Fixes o Docs o Translations o Internal + 0.85.2 o Docs o Translations o Internal + 0.85.1 o Fixes o Docs o Internal + 0.85.0 o Features o Internal + 0.84.0 o Breaking Changes + 0.83.0 o Features o Fixes o Docs o Internal + 0.82.0 o Features o Fixes o Docs o Translations o Internal + 0.81.0 o Features o Fixes o Docs o Translations o Internal + 0.80.0 o Breaking Changes - Fixes o Fixes o Translations + 0.79.1 o Fixes o Docs o Translations o Internal + 0.79.0 o Fixes - Breaking Changes o Translations o Internal + 0.78.0 o Features o Docs o Translations o Internal + 0.77.1 o Upgrades o Docs o Translations o Internal + 0.77.0 o Upgrades o Docs o Translations + 0.76.0 o Upgrades o Internal + 0.75.2 o Fixes o Upgrades o Internal + 0.75.1 o Translations o Internal + 0.75.0 o Features + 0.74.1 o Features + 0.74.0 o Breaking Changes o Features o Internal + 0.73.0 o Features o Docs o Fixes o Internal + 0.72.0 o Features o Docs o Translations o Internal + 0.71.0 o Features o Internal + 0.70.1 o Fixes o Translations o Internal + 0.70.0 o Breaking Changes - Upgrade + 0.69.0 o Breaking Changes - Upgrade o Features o Docs o Translations o Internal + 0.68.2 o Features o Docs o Translations o Internal + 0.68.1 o Translations o Internal + 0.68.0 o Features o Docs o Translations o Internal + 0.67.0 o Features o Docs o Internal + 0.66.1 o Translations o Internal + 0.66.0 o Features o Fixes o Translations + 0.65.3 o Fixes o Translations o Internal + 0.65.2 o Security fixes o Internal + 0.65.1 o Security fixes + 0.65.0 o Breaking Changes - Upgrade o Translations o Internal + 0.64.0 o Features o Fixes o Docs o Translations o Internal + 0.63.0 o Features o Breaking changes o Fixes o Docs o Translations o Internal + 0.62.0 o Features o Breaking Changes o Docs o Translations o Internal + 0.61.2 o Fixes o Docs o Translations o Internal + 0.61.1 o Fixes o Docs o Translations o Internal + 0.61.0 o Features o Breaking Changes o Docs o Internal + 0.60.2 + 0.60.1 + 0.60.0 + 0.59.0 + 0.58.1 + 0.58.0 + 0.57.0 + 0.56.1 + 0.56.0 + 0.55.1 + 0.55.0 + 0.54.2 + 0.54.1 + 0.54.0 + 0.53.2 + 0.53.1 + 0.53.0 + 0.52.0 + 0.51.0 + 0.50.0 + 0.49.2 + 0.49.1 + 0.49.0 + 0.48.0 + 0.47.1 + 0.47.0 + 0.46.0 + 0.45.0 + 0.44.1 + 0.44.0 + 0.43.0 + 0.42.0 + 0.41.0 + 0.40.0 + 0.39.0 + 0.38.1 + 0.38.0 + 0.37.0 + 0.36.0 + 0.35.0 + 0.34.0 + 0.33.0 + 0.32.0 + 0.31.0 + 0.30.1 + 0.30.0 + 0.29.1 + 0.29.0 + 0.28.0 + 0.27.2 + 0.27.1 + 0.27.0 + 0.26.0 + 0.25.0 + 0.24.0 + 0.23.0 + 0.22.0 + 0.21.0 + 0.20.1 + 0.20.0 + 0.19.0 + 0.18.0 + 0.17.0 + 0.16.0 + 0.15.0 + 0.14.0 + 0.13.0 + 0.12.1 + 0.12.0 + 0.11.0 + 0.10.3 + 0.10.2 + 0.10.1 + 0.10.0 + 0.9.1 + 0.9.0 + 0.8.0 + 0.7.1 + 0.7.0 + 0.6.4 + 0.6.3 + 0.6.2 + 0.6.1 + 0.6.0 + 0.5.1 + 0.5.0 + 0.4.0 + 0.3.0 + 0.2.1 + 0.2.0 + 0.1.19 Table of contents * Latest Changes * 0.100.0 + Migration + Pydantic v1 + Changes * 0.99.1 + Fixes + Docs * 0.99.0 + Features + Docs + Translations + Internal * 0.98.0 + Features + Docs + Translations + Internal * 0.97.0 + Features + Refactors + Upgrades + Internal * 0.96.1 + Fixes + Upgrades + Refactors + Docs + Translations + Internal * 0.96.0 + Features + Docs + Translations + Internal * 0.95.2 + Translations + Internal * 0.95.1 + Fixes + Docs + Translations + Internal * 0.95.0 + Highlights + Features + Docs * 0.94.1 + Fixes * 0.94.0 + Upgrades + Docs + Translations + Internal * 0.93.0 + Features + Docs + Translations + Internal * 0.92.0 + Upgrades * 0.91.0 + Upgrades * 0.90.1 + Upgrades + Docs + Translations + Internal * 0.90.0 + Upgrades + Docs + Translations + Internal * 0.89.1 + Fixes + Docs + Translations * 0.89.0 + Features + Docs + Translations + Internal * 0.88.0 + Upgrades + Docs + Translations + Internal * 0.87.0 + Features + Docs + Translations + Internal * 0.86.0 + Features + Fixes + Docs + Translations + Internal * 0.85.2 + Docs + Translations + Internal * 0.85.1 + Fixes + Docs + Internal * 0.85.0 + Features + Internal * 0.84.0 + Breaking Changes * 0.83.0 + Features + Fixes + Docs + Internal * 0.82.0 + Features + Fixes + Docs + Translations + Internal * 0.81.0 + Features + Fixes + Docs + Translations + Internal * 0.80.0 + Breaking Changes - Fixes + Fixes + Translations * 0.79.1 + Fixes + Docs + Translations + Internal * 0.79.0 + Fixes - Breaking Changes + Translations + Internal * 0.78.0 + Features + Docs + Translations + Internal * 0.77.1 + Upgrades + Docs + Translations + Internal * 0.77.0 + Upgrades + Docs + Translations * 0.76.0 + Upgrades + Internal * 0.75.2 + Fixes + Upgrades + Internal * 0.75.1 + Translations + Internal * 0.75.0 + Features * 0.74.1 + Features * 0.74.0 + Breaking Changes + Features + Internal * 0.73.0 + Features + Docs + Fixes + Internal * 0.72.0 + Features + Docs + Translations + Internal * 0.71.0 + Features + Internal * 0.70.1 + Fixes + Translations + Internal * 0.70.0 + Breaking Changes - Upgrade * 0.69.0 + Breaking Changes - Upgrade + Features + Docs + Translations + Internal * 0.68.2 + Features + Docs + Translations + Internal * 0.68.1 + Translations + Internal * 0.68.0 + Features + Docs + Translations + Internal * 0.67.0 + Features + Docs + Internal * 0.66.1 + Translations + Internal * 0.66.0 + Features + Fixes + Translations * 0.65.3 + Fixes + Translations + Internal * 0.65.2 + Security fixes + Internal * 0.65.1 + Security fixes * 0.65.0 + Breaking Changes - Upgrade + Translations + Internal * 0.64.0 + Features + Fixes + Docs + Translations + Internal * 0.63.0 + Features + Breaking changes + Fixes + Docs + Translations + Internal * 0.62.0 + Features + Breaking Changes + Docs + Translations + Internal * 0.61.2 + Fixes + Docs + Translations + Internal * 0.61.1 + Fixes + Docs + Translations + Internal * 0.61.0 + Features + Breaking Changes + Docs + Internal * 0.60.2 * 0.60.1 * 0.60.0 * 0.59.0 * 0.58.1 * 0.58.0 * 0.57.0 * 0.56.1 * 0.56.0 * 0.55.1 * 0.55.0 * 0.54.2 * 0.54.1 * 0.54.0 * 0.53.2 * 0.53.1 * 0.53.0 * 0.52.0 * 0.51.0 * 0.50.0 * 0.49.2 * 0.49.1 * 0.49.0 * 0.48.0 * 0.47.1 * 0.47.0 * 0.46.0 * 0.45.0 * 0.44.1 * 0.44.0 * 0.43.0 * 0.42.0 * 0.41.0 * 0.40.0 * 0.39.0 * 0.38.1 * 0.38.0 * 0.37.0 * 0.36.0 * 0.35.0 * 0.34.0 * 0.33.0 * 0.32.0 * 0.31.0 * 0.30.1 * 0.30.0 * 0.29.1 * 0.29.0 * 0.28.0 * 0.27.2 * 0.27.1 * 0.27.0 * 0.26.0 * 0.25.0 * 0.24.0 * 0.23.0 * 0.22.0 * 0.21.0 * 0.20.1 * 0.20.0 * 0.19.0 * 0.18.0 * 0.17.0 * 0.16.0 * 0.15.0 * 0.14.0 * 0.13.0 * 0.12.1 * 0.12.0 * 0.11.0 * 0.10.3 * 0.10.2 * 0.10.1 * 0.10.0 * 0.9.1 * 0.9.0 * 0.8.0 * 0.7.1 * 0.7.0 * 0.6.4 * 0.6.3 * 0.6.2 * 0.6.1 * 0.6.0 * 0.5.1 * 0.5.0 * 0.4.0 * 0.3.0 * 0.2.1 * 0.2.0 * 0.1.19 Release NotesP Latest ChangesP * Update links for self-hosted Swagger UI, point to v5, for OpenAPI 31.0. PR #9834 by @tiangolo. 0.100.0P Support for Pydantic v2 Pydantic version 2 has the core re-written in Rust and includes a lot of improvements and features, for example: * Improved correctness in corner cases. * Safer types. * Better performance and less energy consumption. * Better extensibility. * etc. ...all this while keeping the same Python API. In most of the cases, for simple models, you can simply upgrade the Pydantic version and get all the benefits. In some cases, for pure data validation and processing, you can get performance improvements of 20x or more. This means 2,000% or more. When you use FastAPI, there's a lot more going on, processing the request and response, handling dependencies, executing your own code, and particularly, waiting for the network. But you will probably still get some nice performance improvements just from the upgrade. 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, correctness, code improvements, and then performance improvements. Some third-party early beta testers that ran benchmarks on the beta releases of FastAPI reported improvements of 2x - 3x. Which is not bad for just doing pip install --upgrade fastapi pydantic. This was not an official benchmark and I didn't check it myself, but it's a good sign. MigrationP Check out the Pydantic migration guide. For the things that need changes in your Pydantic models, the Pydantic team built bump-pydantic. A command line tool that will process your code and update most of the things automatically for you. Make sure you have your code in git first, and review each of the changes to make sure everything is correct before committing the changes. Pydantic v1P This version of FastAPI still supports Pydantic v1. And although Pydantic v1 will be deprecated at some point, ti will still be supported for a while. 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. There are tests for both Pydantic v1 and v2, and test coverage is kept at 100%. ChangesP * There are new parameter fields supported by Pydantic Field() for: + Path() + Query() + Header() + Cookie() + Body() + Form() + File() * The new parameter fields are: + default_factory + alias_priority + validation_alias + serialization_alias + discriminator + strict + multiple_of + allow_inf_nan + max_digits + decimal_places + json_schema_extra ...you can read about them in the Pydantic docs. * The parameter regex has been deprecated and replaced by pattern. + You can read more about it in the docs for Query Parameters and String Validations: Add regular expressions. * New Pydantic models use an improved and simplified attribute model_config that takes a simple dict instead of an internal class Config for their configuration. + You can read more about it in the docs for Declare Request Example Data. * The attribute schema_extra for the internal class Config has been replaced by the key json_schema_extra in the new model_config dict. + You can read more about it in the docs for Declare Request Example Data. * When you install "fastapi[all]" it now also includes: + pydantic-settings - for settings management. + pydantic-extra-types - for extra types to be used with Pydantic. * Now Pydantic Settings is an additional optional package (included in "fastapi[all]"). To use settings you should now import from pydantic_settings import BaseSettings instead of importing from pydantic directly. + You can read more about it in the docs for Settings and Environment Variables. * PR #9816 by @tiangolo, included all the work done (in multiple PRs) on the beta branch (main-pv2). 0.99.1P FixesP * Fix JSON Schema accepting bools as valid JSON Schemas, e.g. additionalProperties: false. PR #9781 by @tiangolo. DocsP * Update source examples to use new JSON Schema examples field. PR #9776 by @tiangolo. 0.99.0P FeaturesP * Add support for OpenAPI 3.1.0. PR #9770 by @tiangolo. + New support for documenting webhooks, read the new docs here: Advanced User Guide: OpenAPI Webhooks. + Upgrade OpenAPI 3.1.0, this uses JSON Schema 2020-12. + Upgrade Swagger UI to version 5.x.x, that supports OpenAPI 3.1.0. + Updated examples field in Query(), Cookie(), Body(), etc. based on the latest JSON Schema and OpenAPI. Now it takes a list of examples and they are included directly in the JSON Schema, not outside. Read more about it (including the historical technical details) in the updated docs: Tutorial: Declare Request Example Data. * Add support for deque objects and children in jsonable_encoder. PR #9433 by @cranium. DocsP * Fix form for the FastAPI and friends newsletter. PR #9749 by @tiangolo. TranslationsP * Add Persian translation for docs/fa/docs/advanced/ sub-applications.md. PR #9692 by @mojtabapaso. * Add Russian translation for docs/ru/docs/tutorial/ response-model.md. PR #9675 by @glsglsgls. InternalP * Enable linenums in MkDocs Material during local live development to simplify highlighting code. PR #9769 by @tiangolo. * Update httpx requirement from <0.24.0,>=0.23.0 to >=0.23.0, <0.25.0. PR #9724 by @dependabot[bot]. * Bump mkdocs-material from 9.1.16 to 9.1.17. PR #9746 by @dependabot[bot]. * Remove missing translation dummy pages, no longer necessary. PR #9751 by @tiangolo. * [pre-commit.ci] pre-commit autoupdate. PR #9259 by @pre-commit-ci[bot]. * Add Material for MkDocs Insiders features and cards. PR #9748 by @tiangolo. * Remove languages without translations. PR #9743 by @tiangolo. * Refactor docs for building scripts, use MkDocs hooks, simplify (remove) configs for languages. PR #9742 by @tiangolo. * Add MkDocs hook that renames sections based on the first index file. PR #9737 by @tiangolo. * Make cron jobs run only on main repo, not on forks, to avoid error notifications from missing tokens. PR #9735 by @tiangolo. * Update MkDocs for other languages. PR #9734 by @tiangolo. * Refactor Docs CI, run in multiple workers with a dynamic matrix to optimize speed. PR #9732 by @tiangolo. * Remove old internal GitHub Action watch-previews that is no longer needed. PR #9730 by @tiangolo. * [?] Upgrade MkDocs and MkDocs Material. PR #9729 by @tiangolo. * Build and deploy docs only on docs changes. PR #9728 by @tiangolo. 0.98.0P FeaturesP * Allow disabling redirect_slashes at the FastAPI app level. PR # 3432 by @cyberlis. DocsP * Update docs on Pydantic using ujson internally. PR #5804 by @mvasilkov. * Rewording in docs/en/docs/tutorial/debugging.md. PR #9581 by @ivan-abc. * Add german blog post (Domain-driven Design mit Python und FastAPI). PR #9261 by @msander. * [?] Tweak wording in docs/en/docs/tutorial/security/index.md. PR # 9561 by @jyothish-mohan. * Update Annotated notes in docs/en/docs/tutorial/ schema-extra-example.md. PR #9620 by @Alexandrhub. * [?] Fix typo Annotation -> Annotated in docs/en/docs/tutorial/ query-params-str-validations.md. PR #9625 by @mccricardo. * Use in memory database for testing SQL in docs. PR #1223 by @HarshaLaxman. TranslationsP * Add Russian translation for docs/ru/docs/tutorial/metadata.md. PR #9681 by @TabarakoAkula. * Fix typo in Spanish translation for docs/es/docs/tutorial/ first-steps.md. PR #9571 by @lilidl-nft. * Add Russian translation for docs/tutorial/ path-operation-configuration.md. PR #9696 by @TabarakoAkula. * Add Chinese translation for docs/zh/docs/advanced/security/ index.md. PR #9666 by @lordqyxz. * Add Chinese translations for docs/zh/docs/advanced/settings.md. PR #9652 by @ChoyeonChern. * Add Chinese translations for docs/zh/docs/advanced/ websockets.md. PR #9651 by @ChoyeonChern. * Add Chinese translation for docs/zh/docs/tutorial/testing.md. PR #9641 by @wdh99. * Add Russian translation for docs/tutorial/extra-models.md. PR # 9619 by @ivan-abc. * Add Russian translation for docs/tutorial/cors.md. PR #9608 by @ivan-abc. * Add Polish translation for docs/pl/docs/features.md. PR #5348 by @mbroton. * Add Russian translation for docs/ru/docs/tutorial/ body-nested-models.md. PR #9605 by @Alexandrhub. InternalP * Bump ruff from 0.0.272 to 0.0.275. PR #9721 by @dependabot[bot] . * Update uvicorn[standard] requirement from <0.21.0,>=0.12.0 to > =0.12.0,<0.23.0. PR #9463 by @dependabot[bot]. * Bump mypy from 1.3.0 to 1.4.0. PR #9719 by @dependabot[bot]. * Update pre-commit requirement from <3.0.0,>=2.17.0 to >=2.17.0, <4.0.0. PR #9251 by @dependabot[bot]. * Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6. PR #9482 by @dependabot[bot]. * [?] Fix tooltips for light/dark theme toggler in docs. PR #9588 by @pankaj1707k. * Set minimal hatchling version needed to build the package. PR # 9240 by @mgorny. * Add repo link to PyPI. PR #9559 by @JacobCoffee. * [?] Fix typos in data for tests. PR #4958 by @ryanrussell. * Update sponsors, add Flint. PR #9699 by @tiangolo. * Lint in CI only once, only with one version of Python, run tests with all of them. PR #9686 by @tiangolo. 0.97.0P FeaturesP * Add support for dependencies in WebSocket routes. PR #4534 by @paulo-raca. * Add exception handler for WebSocketRequestValidationError (which also allows to override it). PR #6030 by @kristjanvalur. RefactorsP * [?] Upgrade and fully migrate to Ruff, remove isort, includes a couple of tweaks suggested by the new version of Ruff. PR #9660 by @tiangolo. * [?][?] Update internal type annotations and upgrade mypy. PR #9658 by @tiangolo. * [?][?] Simplify AsyncExitStackMiddleware as without Python 3.6 AsyncExitStack is always available. PR #9657 by @tiangolo. UpgradesP * [?] Upgrade Black. PR #9661 by @tiangolo. InternalP * Update CI cache to fix installs when dependencies change. PR # 9659 by @tiangolo. * [?] Separate requirements for development into their own requirements.txt files, they shouldn't be extras. PR #9655 by @tiangolo. 0.96.1P FixesP * Fix HTTPException header type annotations. PR #9648 by @tiangolo. * Fix OpenAPI model fields int validations, gte to ge. PR #9635 by @tiangolo. UpgradesP * Update minimum version of Pydantic to >=1.7.4. This fixes an issue when trying to use an old version of Pydantic. PR #9567 by @Kludex. RefactorsP * [?] Remove media_type from ORJSONResponse as it's inherited from the parent class. PR #5805 by @Kludex. * [?] Instantiate HTTPException only when needed, optimization refactor. PR #5356 by @pawamoy. DocsP * Remove link to Pydantic's benchmark, as it was removed there. PR #5811 by @Kludex. TranslationsP * Fix spelling in Indonesian translation of docs/id/docs/tutorial /index.md. PR #5635 by @purwowd. * Add Russian translation for docs/ru/docs/tutorial/index.md. PR #5896 by @Wilidon. * Add Chinese translations for docs/zh/docs/advanced/ response-change-status-code.md and docs/zh/docs/advanced/ response-headers.md. PR #9544 by @ChoyeonChern. * Add Russian translation for docs/ru/docs/tutorial/ schema-extra-example.md. PR #9621 by @Alexandrhub. InternalP * Add sponsor Platform.sh. PR #9650 by @tiangolo. * Add custom token to Smokeshow and Preview Docs for download-artifact, to prevent API rate limits. PR #9646 by @tiangolo. * Add custom tokens for GitHub Actions to avoid rate limits. PR # 9647 by @tiangolo. 0.96.0P FeaturesP * [?] Update create_cloned_field to use a global cache and improve startup performance. PR #4645 by @madkinsz and previous original PR by @huonw. DocsP * Update Deta deployment tutorial for compatibility with Deta Space. PR #6004 by @mikBighne98. * [?] Fix typo in Deta deployment tutorial. PR #9501 by @lemonyte. TranslationsP * Add Russian translation for docs/tutorial/body.md. PR #3885 by @solomein-sv. * Add Russian translation for docs/ru/docs/tutorial/ static-files.md. PR #9580 by @Alexandrhub. * Add Russian translation for docs/ru/docs/tutorial/ query-params.md. PR #9584 by @Alexandrhub. * Add Russian translation for docs/ru/docs/tutorial/ first-steps.md. PR #9471 by @AGolicyn. * Add Russian translation for docs/ru/docs/tutorial/debugging.md. PR #9579 by @Alexandrhub. * Add Russian translation for docs/ru/docs/tutorial/ path-params.md. PR #9519 by @AGolicyn. * Add Chinese translation for docs/zh/docs/tutorial/ static-files.md. PR #9436 by @wdh99. * Update Spanish translation including new illustrations in docs/ es/docs/async.md. PR #9483 by @andresbermeoq. * Add Russian translation for docs/ru/docs/tutorial/ path-params-numeric-validations.md. PR #9563 by @ivan-abc. * Add Russian translation for docs/ru/docs/deployment/ concepts.md. PR #9577 by @Xewus. * Add Russian translation for docs/ru/docs/tutorial/ body-multiple-params.md. PR #9586 by @Alexandrhub. InternalP * Update FastAPI People. PR #9602 by @github-actions[bot]. * Update sponsors, remove InvestSuite. PR #9612 by @tiangolo. 0.95.2P * [?] Upgrade Starlette version to >=0.27.0 for a security release. PR #9541 by @tiangolo. Details on Starlette's security advisory. TranslationsP * Add Portuguese translation for docs/pt/docs/advanced/events.md. PR #9326 by @oandersonmagalhaes. * Add Russian translation for docs/ru/docs/deployment/ manually.md. PR #9417 by @Xewus. * Add setup for translations to Lao. PR #9396 by @TheBrown. * Add Russian translation for docs/ru/docs/tutorial/testing.md. PR #9403 by @Xewus. * Add Russian translation for docs/ru/docs/deployment/https.md. PR #9428 by @Xewus. * Fix command to install requirements in Windows. PR #9445 by @MariiaRomanuik. * Add French translation for docs/fr/docs/advanced/ response-directly.md. PR #9415 by @axel584. * Initiate Czech translation setup. PR #9288 by @3p1463k. * Fix typo in Portuguese docs for docs/pt/docs/index.md. PR #9337 by @lucasbalieiro. * Add Russian translation for docs/ru/docs/tutorial/ response-status-code.md. PR #9370 by @nadia3373. InternalP * Fix flask.escape warning for internal tests. PR #9468 by @samuelcolvin. * Refactor 2 tests, for consistency and simplification. PR #9504 by @tiangolo. * Refactor OpenAPI tests, prepare for Pydantic v2. PR #9503 by @tiangolo. * Bump dawidd6/action-download-artifact from 2.26.0 to 2.27.0. PR #9394 by @dependabot[bot]. * Disable setup-python pip cache in CI. PR #9438 by @tiangolo. * Bump pypa/gh-action-pypi-publish from 1.6.4 to 1.8.5. PR #9346 by @dependabot[bot]. 0.95.1P FixesP * Fix using Annotated in routers or path operations decorated multiple times. PR #9315 by @sharonyogev. DocsP * Translate docs to Emoji . PR #5385 by @LeeeeT. * Add notification message warning about old versions of FastAPI not supporting Annotated. PR #9298 by @grdworkin. * Fix typo in docs/en/docs/advanced/behind-a-proxy.md. PR #5681 by @Leommjr. * Fix wrong import from typing module in Persian translations for docs/fa/docs/index.md. PR #6083 by @Kimiaattaei. * [?] Fix format, remove unnecessary asterisks in docs/en/docs/ help-fastapi.md. PR #9249 by @armgabrielyan. * Fix typo in docs/en/docs/tutorial/ query-params-str-validations.md. PR #9272 by @nicornk. * Fix typo/bug in inline code example in docs/en/docs/tutorial/ query-params-str-validations.md. PR #9273 by @tim-habitat. * Fix typo in docs/en/docs/tutorial/ path-params-numeric-validations.md. PR #9282 by @aadarsh977. * Fix typo: 'wll' to 'will' in docs/en/docs/tutorial/ query-params-str-validations.md. PR #9380 by @dasstyxx. TranslationsP * Add French translation for docs/fr/docs/advanced/index.md. PR # 5673 by @axel584. * Add Portuguese translation for docs/pt/docs/tutorial/ body-nested-models.md. PR #4053 by @luccasmmg. * Add Russian translation for docs/ru/docs/alternatives.md. PR # 5994 by @Xewus. * Add Portuguese translation for docs/pt/docs/tutorial/ extra-models.md. PR #5912 by @LorhanSohaky. * Add Portuguese translation for docs/pt/docs/tutorial/ path-operation-configuration.md. PR #5936 by @LorhanSohaky. * Add Russian translation for docs/ru/docs/contributing.md. PR # 6002 by @stigsanek. * Add Korean translation for docs/tutorial/dependencies/ classes-as-dependencies.md. PR #9176 by @sehwan505. * Add Russian translation for docs/ru/docs/project-generation.md. PR #9243 by @Xewus. * Add French translation for docs/fr/docs/index.md. PR #9265 by @frabc. * Add Russian translation for docs/ru/docs/tutorial/ query-params-str-validations.md. PR #9267 by @dedkot01. * Add Russian translation for docs/ru/docs/benchmarks.md. PR # 9271 by @Xewus. InternalP * Update sponsors: remove Jina. PR #9388 by @tiangolo. * Update sponsors, add databento, remove Ines's course and StriveWorks. PR #9351 by @tiangolo. 0.95.0P HighlightsP This release adds support for dependencies and parameters using Annotated and recommends its usage. This has several benefits, one of the main ones is that now the parameters of your functions with Annotated would not be affected at all. If you call those functions in other places in your code, the actual default values will be kept, your editor will help you notice missing required arguments, Python will require you to pass required arguments at runtime, you will be able to use the same functions for different things and with different libraries (e.g. Typer will soon support Annotated too, then you could use the same function for an API and a CLI), etc. Because Annotated is standard Python, you still get all the benefits from editors and tools, like autocompletion, inline errors, etc. One of the biggest benefits is that now you can create Annotated dependencies that are then shared by multiple path operation functions, this will allow you to reduce a lot of code duplication in your codebase, while keeping all the support from editors and tools. For example, you could have code like this: def get_current_user(token: str): # authenticate user return User() @app.get("/items/") def read_items(user: User = Depends(get_current_user)): ... @app.post("/items/") def create_item(*, user: User = Depends(get_current_user), item: Item): ... @app.get("/items/{item_id}") def read_item(*, user: User = Depends(get_current_user), item_id: int): ... @app.delete("/items/{item_id}") def delete_item(*, user: User = Depends(get_current_user), item_id: int): ... There's a bit of code duplication for the dependency: user: User = Depends(get_current_user) ...the bigger the codebase, the more noticeable it is. Now you can create an annotated dependency once, like this: CurrentUser = Annotated[User, Depends(get_current_user)] And then you can reuse this Annotated dependency: CurrentUser = Annotated[User, Depends(get_current_user)] @app.get("/items/") def read_items(user: CurrentUser): ... @app.post("/items/") def create_item(user: CurrentUser, item: Item): ... @app.get("/items/{item_id}") def read_item(user: CurrentUser, item_id: int): ... @app.delete("/items/{item_id}") def delete_item(user: CurrentUser, item_id: int): ... ...and CurrentUser has all the typing information as User, so your editor will work as expected (autocompletion and everything), and FastAPI will be able to understand the dependency defined in Annotated. Roughly all the docs have been rewritten to use Annotated as the main way to declare parameters and dependencies. All the examples in the docs now include a version with Annotated and a version without it, for each of the specific Python versions (when there are small differences/improvements in more recent versions). There were around 23K new lines added between docs, examples, and tests. The key updated docs are: * Python Types Intro: + Type Hints with Metadata Annotations. * Tutorial: + Query Parameters and String Validations - Additional validation o Advantages of Annotated + Path Parameters and Numeric Validations - Order the parameters as you need, tricks o Better with Annotated + Dependencies - First Steps - Share Annotated dependencies Special thanks to @nzig for the core implementation and to @adriangb for the inspiration and idea with Xpresso! FeaturesP * Add support for PEP-593 Annotated for specifying dependencies and parameters. PR #4871 by @nzig. DocsP * Tweak tip recommending Annotated in docs. PR #9270 by @tiangolo . * Update order of examples, latest Python version first, and simplify version tab names. PR #9269 by @tiangolo. * Update all docs to use Annotated as the main recommendation, with new examples and tests. PR #9268 by @tiangolo. 0.94.1P FixesP * Fix types for lifespan, upgrade Starlette to 0.26.1. PR #9245 by @tiangolo. 0.94.0P UpgradesP * Upgrade python-multipart to support 0.0.6. PR #9212 by @musicinmybrain. * [?] Upgrade Starlette version, support new lifespan with state. PR #9239 by @tiangolo. DocsP * Update Sentry link in docs. PR #9218 by @smeubank. TranslationsP * Add Russian translation for docs/ru/docs/ history-design-future.md. PR #5986 by @Xewus. InternalP * Add pydantic to PyPI classifiers. PR #5914 by @yezz123. * Bump black from 22.10.0 to 23.1.0. PR #5953 by @dependabot[bot] . * Bump types-ujson from 5.6.0.0 to 5.7.0.1. PR #6027 by @dependabot[bot]. * Bump dawidd6/action-download-artifact from 2.24.3 to 2.26.0. PR #6034 by @dependabot[bot]. * [pre-commit.ci] pre-commit autoupdate. PR #5709 by @pre-commit-ci[bot]. 0.93.0P FeaturesP * Add support for lifespan async context managers (superseding startup and shutdown events). Initial PR #2944 by @uSpike. Now, instead of using independent startup and shutdown events, you can define that logic in a single function with yield decorated with @asynccontextmanager (an async context manager). For example: from contextlib import asynccontextmanager from fastapi import FastAPI def fake_answer_to_everything_ml_model(x: float): return x * 42 ml_models = {} @asynccontextmanager async def lifespan(app: FastAPI): # Load the ML model ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model yield # Clean up the ML models and release the resources ml_models.clear() app = FastAPI(lifespan=lifespan) @app.get("/predict") async def predict(x: float): result = ml_models["answer_to_everything"](x) return {"result": result} Note: This is the recommended way going forward, instead of using startup and shutdown events. Read more about it in the new docs: Advanced User Guide: Lifespan Events. DocsP * Fix formatting in docs/en/docs/tutorial/metadata.md for ReDoc. PR #6005 by @eykamp. TranslationsP * Tamil translations - initial setup. PR #5564 by @gusty1g. * Add French translation for docs/fr/docs/advanced/ path-operation-advanced-configuration.md. PR #9221 by @axel584. * Add French translation for docs/tutorial/debugging.md. PR #9175 by @frabc. * Initiate Armenian translation setup. PR #5844 by @har8. * Add French translation for deployment/manually.md. PR #3693 by @rjNemo. InternalP * Update translation bot messages. PR #9206 by @tiangolo. * Update translations bot to use Discussions, and notify when a PR is done. PR #9183 by @tiangolo. * Update sponsors-badges. PR #9182 by @tiangolo. * Update FastAPI People. PR #9181 by @github-actions[bot]. * Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error. PR #9171 by @tiangolo. * Fix/workaround GitHub Actions in Docker with git for FastAPI People. PR #9169 by @tiangolo. * [?][?] Refactor FastAPI Experts to use only discussions now that questions are migrated. PR #9165 by @tiangolo. * [?] Upgrade analytics. PR #6025 by @tiangolo. * [?] Upgrade and re-enable installing Typer-CLI. PR #6008 by @tiangolo. 0.92.0P This is a security fix. Please upgrade as soon as possible. UpgradesP * [?] Upgrade Starlette to 0.25.0. PR #5996 by @tiangolo. + This solves a vulnerability that could allow denial of service attacks by using many small multipart fields/files (parts), consuming high CPU and memory. + Only applications using forms (e.g. file uploads) could be affected. + For most cases, upgrading won't have any breaking changes. 0.91.0P UpgradesP * [?] Upgrade Starlette version to 0.24.0 and refactor internals for compatibility. PR #5985 by @tiangolo. + This can solve nuanced errors when using middlewares. Before Starlette 0.24.0, a new instance of each middleware class would be created when a new middleware was added. That normally was not a problem, unless the middleware class expected to be created only once, with only one instance, that happened in some cases. This upgrade would solve those cases (thanks @adriangb! Starlette PR #2017). Now the middleware class instances are created once, right before the first request (the first time the app is called). + If you depended on that previous behavior, you might need to update your code. As always, make sure your tests pass before merging the upgrade. 0.90.1P UpgradesP * [?] Upgrade Starlette range to allow 0.23.1. PR #5980 by @tiangolo . DocsP * Tweak wording to clarify docs/en/docs/project-generation.md. PR #5930 by @chandra-deb. * Update Pydantic GitHub URLs. PR #5952 by @yezz123. * Add opinion from Cisco. PR #5981 by @tiangolo. TranslationsP * Add Russian translation for docs/ru/docs/tutorial/ cookie-params.md. PR #5890 by @bnzone. InternalP * Update zip-docs.sh internal script, remove extra space. PR # 5931 by @JuanPerdomo00. 0.90.0P UpgradesP * [?] Bump Starlette from 0.22.0 to 0.23.0. Initial PR #5739 by @Kludex. DocsP * Add article "Tortoise ORM / FastAPI Zheng He Kuai Su Bi Ji " to External Links. PR #5496 by @Leon0824. * Update FastAPI People. PR #5954 by @github-actions[bot]. * Micro-tweak help docs. PR #5960 by @tiangolo. * Update new issue chooser to direct to GitHub Discussions. PR # 5948 by @tiangolo. * Recommend GitHub Discussions for questions. PR #5944 by @tiangolo. TranslationsP * Add Russian translation for docs/ru/docs/tutorial/ body-fields.md. PR #5898 by @simatheone. * Add Russian translation for docs/ru/docs/help-fastapi.md. PR # 5970 by @tiangolo. * Add Portuguese translation for docs/pt/docs/tutorial/ static-files.md. PR #5858 by @batlopes. * Add Portuguese translation for docs/pt/docs/tutorial/ encoder.md. PR #5525 by @felipebpl. * Add Russian translation for docs/ru/docs/contributing.md. PR # 5870 by @Xewus. InternalP * [?] Upgrade Ubuntu version for docs workflow. PR #5971 by @tiangolo. * Update sponsors badges. PR #5943 by @tiangolo. * Compute FastAPI Experts including GitHub Discussions. PR #5941 by @tiangolo. * [?] Upgrade isort and update pre-commit. PR #5940 by @tiangolo. * Add template for questions in Discussions. PR #5920 by @tiangolo. * Update Sponsor Budget Insight to Powens. PR #5916 by @tiangolo. * Update GitHub Sponsors badge data. PR #5915 by @tiangolo. 0.89.1P FixesP * Ignore Response classes on return annotation. PR #5855 by @Kludex. See the new docs in the PR below. DocsP * Update docs and examples for Response Model with Return Type Annotations, and update runtime error. PR #5873 by @tiangolo. New docs at Response Model - Return Type: Other Return Type Annotations. * Add External Link: FastAPI lambda container: serverless simplified. PR #5784 by @rafrasenberg. TranslationsP * Add Turkish translation for docs/tr/docs/tutorial/ first_steps.md. PR #5691 by @Kadermiyanyedi. 0.89.0P FeaturesP * Add support for function return type annotations to declare the response_model. Initial PR #1436 by @uriyyo. Now you can declare the return type / response_model in the function return type annotation: from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float @app.get("/items/") async def read_items() -> list[Item]: return [ Item(name="Portal Gun", price=42.0), Item(name="Plumbus", price=32.0), ] FastAPI will use the return type annotation to perform: * Data validation * Automatic documentation + It could power automatic client generators * Data filtering Before this version it was only supported via the response_model parameter. Read more about it in the new docs: Response Model - Return Type. DocsP * Add External Link: Authorization on FastAPI with Casbin. PR # 5712 by @Xhy-5000. * Fix typo in docs/en/docs/async.md. PR #5785 by @Kingdageek. * Fix typo in docs/en/docs/deployment/concepts.md. PR #5824 by @kelbyfaessler. TranslationsP * Add Russian translation for docs/ru/docs/fastapi-people.md. PR #5577 by @Xewus. * Fix typo in Chinese translation for docs/zh/docs/benchmarks.md. PR #4269 by @15027668g. * Add Korean translation for docs/tutorial/cors.md. PR #3764 by @NinaHwang. InternalP * Update coverage[toml] requirement from <7.0,>=6.5.0 to >=6.5.0, <8.0. PR #5801 by @dependabot[bot]. * Update uvicorn[standard] requirement from <0.19.0,>=0.12.0 to > =0.12.0,<0.21.0 for development. PR #5795 by @dependabot[bot]. * Bump dawidd6/action-download-artifact from 2.24.2 to 2.24.3. PR #5842 by @dependabot[bot]. * Update FastAPI People. PR #5825 by @github-actions[bot]. * Bump types-ujson from 5.5.0 to 5.6.0.0. PR #5735 by @dependabot [bot]. * Bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4. PR #5750 by @dependabot[bot]. * Add GitHub Action gate/check. PR #5492 by @webknjaz. * Update sponsors, add Svix. PR #5848 by @tiangolo. * Remove Doist sponsor. PR #5847 by @tiangolo. * Update sqlalchemy requirement from <=1.4.41,>=1.3.18 to >= 1.3.18,<1.4.43. PR #5540 by @dependabot[bot]. * Bump nwtgck/actions-netlify from 1.2.4 to 2.0.0. PR #5757 by @dependabot[bot]. * Refactor CI artifact upload/download for docs previews. PR # 5793 by @tiangolo. * Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2. PR #5714 by @dependabot[bot]. * Update FastAPI People. PR #5722 by @github-actions[bot]. * Update sponsors, disable course bundle. PR #5713 by @tiangolo. * Update typer[all] requirement from <0.7.0,>=0.6.1 to >=0.6.1, <0.8.0. PR #5639 by @dependabot[bot]. 0.88.0P UpgradesP * Bump Starlette to version 0.22.0 to fix bad encoding for query parameters in new TestClient. PR #5659 by @azogue. DocsP * [?] Fix typo in docs for docs/en/docs/advanced/middleware.md. PR # 5376 by @rifatrakib. TranslationsP * Add Portuguese translation for docs/pt/docs/deployment/ docker.md. PR #5663 by @ayr-ton. InternalP * Tweak build-docs to improve CI performance. PR #5699 by @tiangolo. * [pre-commit.ci] pre-commit autoupdate. PR #5566 by @pre-commit-ci[bot]. * [?] Upgrade Ruff. PR #5698 by @tiangolo. * Remove pip cache for Smokeshow as it depends on a requirements.txt. PR #5700 by @tiangolo. * Fix pip cache for Smokeshow. PR #5697 by @tiangolo. * Fix and tweak CI cache handling. PR #5696 by @tiangolo. * Update setup-python action in tests to use new caching feature. PR #5680 by @madkinsz. * Bump black from 22.8.0 to 22.10.0. PR #5569 by @dependabot[bot] . 0.87.0P Highlights of this release: * Upgraded Starlette + Now the TestClient is based on HTTPX instead of Requests. + There are some possible breaking changes in the TestClient usage, but @Kludex built bump-testclient to help you automatize migrating your tests. Make sure you are using Git and that you can undo any unnecessary changes (false positive changes, etc) before using bump-testclient. * New WebSocketException (and docs), re-exported from Starlette. * Upgraded and relaxed dependencies for package extras all (including new Uvicorn version), when you install "fastapi[all]". * New docs about how to Help Maintain FastAPI. FeaturesP * [?] Upgrade and relax dependencies for extras "all". PR #5634 by @tiangolo. * Re-export Starlette's WebSocketException and add it to docs. PR #5629 by @tiangolo. * Update references to Requests for tests to HTTPX, and add HTTPX to extras. PR #5628 by @tiangolo. * Upgrade Starlette to 0.21.0, including the new TestClient based on HTTPX. PR #5471 by @pawelrubin. DocsP * [?] Tweak Help FastAPI from PR review after merging. PR #5633 by @tiangolo. * [?] Clarify docs on CORS. PR #5627 by @paxcodes. * Update Help FastAPI: Help Maintain FastAPI. PR #5632 by @tiangolo. TranslationsP * Fix highlight lines for Japanese translation for docs/tutorial/ query-params.md. PR #2969 by @ftnext. * Add French translation for docs/fr/docs/advanced/ additional-status-code.md. PR #5477 by @axel584. * Add Portuguese translation for docs/pt/docs/tutorial/ request-forms-and-files.md. PR #5579 by @batlopes. * Add Japanese translation for docs/ja/docs/advanced/ websockets.md. PR #4983 by @xryuseix. InternalP * Use Ruff for linting. PR #5630 by @tiangolo. * Add Arabic issue number to Notify Translations GitHub Action. PR #5610 by @tiangolo. * Bump dawidd6/action-download-artifact from 2.24.1 to 2.24.2. PR #5609 by @dependabot[bot]. * Bump dawidd6/action-download-artifact from 2.24.0 to 2.24.1. PR #5603 by @dependabot[bot]. * Update coverage badge to use Samuel Colvin's Smokeshow. PR # 5585 by @tiangolo. 0.86.0P FeaturesP * Add Python 3.11 to the officially supported versions. PR #5587 by @tiangolo. * Enable tests for Python 3.11. PR #4881 by @tiangolo. FixesP * Close FormData (uploaded files) after the request is done. PR # 5465 by @adriangb. DocsP * Fix typo in docs/en/docs/tutorial/security/oauth2-jwt.md. PR # 5584 by @vivekashok1221. TranslationsP * Update wording in Chinese translation for docs/zh/docs/ python-types.md. PR #5416 by @supercaizehua. * Add Russian translation for docs/ru/docs/deployment/index.md. PR #5336 by @Xewus. * Update Chinese translation for docs/tutorial/security/ oauth2-jwt.md. PR #3846 by @jaystone776. InternalP * Update FastAPI People to exclude bots: pre-commit-ci, dependabot. PR #5586 by @tiangolo. * Format OpenAPI JSON in test_starlette_exception.py. PR #5379 by @iudeen. * Switch from Codecov to Smokeshow plus pytest-cov to pure coverage for internal tests. PR #5583 by @tiangolo. * Update FastAPI People. PR #5571 by @github-actions[bot]. 0.85.2P DocsP * Fix grammar and add helpful links to dependencies in docs/en/ docs/async.md. PR #5432 by @pamelafox. * Fix broken link in alternatives.md. PR #5455 by @su-shubham. * Fix typo in docs about contributing, for compatibility with pip in Zsh. PR #5523 by @zhangbo2012. * Fix typo in docs with examples for Python 3.10 instead of 3.9. PR #5545 by @feliciss. TranslationsP * Add Portuguese translation for docs/pt/docs/tutorial/ request-forms.md. PR #4934 by @batlopes. * Add Chinese translation for docs/zh/docs/tutorial/dependencies/ classes-as-dependencies.md. PR #4971 by @Zssaer. * Add French translation for deployment/deta.md. PR #3692 by @rjNemo. * Update Chinese translation for docs/zh/docs/tutorial/ query-params-str-validations.md. PR #5255 by @hjlarry. * Add Chinese translation for docs/zh/docs/tutorial/ sql-databases.md. PR #4999 by @Zssaer. * Add Chinese translation for docs/zh/docs/advanced/wsgi.md. PR # 4505 by @ASpathfinder. * Add Portuguese translation for docs/pt/docs/tutorial/ body-multiple-params.md. PR #4111 by @lbmendes. * Add Portuguese translation for docs/pt/docs/tutorial/ path-params-numeric-validations.md. PR #4099 by @lbmendes. * Add French translation for deployment/versions.md. PR #3690 by @rjNemo. * Add French translation for docs/fr/docs/help-fastapi.md. PR # 2233 by @JulianMaurin. * Fix typo in Chinese translation for docs/zh/docs/tutorial/ security/first-steps.md. PR #5530 by @yuki1sntSnow. * Add Portuguese translation for docs/pt/docs/tutorial/ response-status-code.md. PR #4922 by @batlopes. * Add config for Tamil translations. PR #5563 by @tiangolo. InternalP * Bump internal dependency mypy from 0.971 to 0.982. PR #5541 by @dependabot[bot]. * Bump nwtgck/actions-netlify from 1.2.3 to 1.2.4. PR #5507 by @dependabot[bot]. * Bump internal dependency types-ujson from 5.4.0 to 5.5.0. PR # 5537 by @dependabot[bot]. * Bump dawidd6/action-download-artifact from 2.23.0 to 2.24.0. PR #5508 by @dependabot[bot]. * Update internal dependency pytest-cov requirement from <4.0.0,> =2.12.0 to >=2.12.0,<5.0.0. PR #5539 by @dependabot[bot]. * [pre-commit.ci] pre-commit autoupdate. PR #5536 by @pre-commit-ci[bot]. * Fix internal Trio test warnings. PR #5547 by @samuelcolvin. * [pre-commit.ci] pre-commit autoupdate. PR #5408 by @pre-commit-ci[bot]. * [?] Upgrade Typer to include Rich in scripts for docs. PR #5502 by @tiangolo. * Fix calling mkdocs for languages as a subprocess to fix/enable MkDocs Material search plugin. PR #5501 by @tiangolo. 0.85.1P FixesP * Fix support for strings in OpenAPI status codes: default, 1XX, 2XX, 3XX, 4XX, 5XX. PR #5187 by @JarroVGIT. DocsP * Add WayScript x FastAPI Tutorial to External Links section. PR #5407 by @moneeka. InternalP * Update FastAPI People. PR #5447 by @github-actions[bot]. * Disable Material for MkDocs search plugin. PR #5495 by @tiangolo. * Ignore Trio warning in tests for CI. PR #5483 by @samuelcolvin. 0.85.0P FeaturesP * Upgrade version required of Starlette from 0.19.1 to 0.20.4. Initial PR #4820 by @Kludex. + This includes several bug fixes in Starlette. * [?] Upgrade Uvicorn max version in public extras: all. From >= 0.12.0,<0.18.0 to >=0.12.0,<0.19.0. PR #5401 by @tiangolo. InternalP * [?] Upgrade dependencies for doc and dev internal extras: Typer, Uvicorn. PR #5400 by @tiangolo. * [?] Upgrade test dependencies: Black, HTTPX, databases, types-ujson. PR #5399 by @tiangolo. * [?] Upgrade mypy and tweak internal type annotations. PR #5398 by @tiangolo. * Update test dependencies, upgrade Pytest, move dependencies from dev to test. PR #5396 by @tiangolo. 0.84.0P Breaking ChangesP 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 by @ofek. 0.83.0P 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 since around a year ago. You hopefully updated to a supported version of Python a while ago. If you haven't, you really should. FeaturesP * Add support in jsonable_encoder for include and exclude with dataclasses. PR #4923 by @DCsunset. FixesP * Fix RuntimeError raised when HTTPException has a status code with no content. PR #5365 by @iudeen. * Fix empty reponse body when default status_code is empty but the a Response parameter with response.status_code is set. PR # 5360 by @tmeckel. DocsP * Update SECURITY.md. PR #5377 by @Kludex. InternalP * [pre-commit.ci] pre-commit autoupdate. PR #5352 by @pre-commit-ci[bot]. 0.82.0P 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 since around a year ago. You hopefully updated to a supported version of Python a while ago. If you haven't, you really should. FeaturesP * Export WebSocketState in fastapi.websockets. PR #4376 by @matiuszka. * Support Python internal description on Pydantic model's docstring. PR #3032 by @Kludex. * Update ORJSONResponse to support non str keys and serializing Numpy arrays. PR #3892 by @baby5. FixesP * 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 by @adriangb. * Fix FastAPI People GitHub Action: set HTTPX timeout for GraphQL query request. PR #5222 by @iudeen. * Make sure a parameter defined as required is kept required in OpenAPI even if defined as optional in another dependency. PR # 4319 by @cd17822. * Fix support for path parameters in WebSockets. PR #3879 by @davidbrochart. DocsP * Update Hypercorn link, now pointing to GitHub. PR #5346 by @baconfield. * Tweak wording in docs/en/docs/advanced/dataclasses.md. PR #3698 by @pfackeldey. * Add note about Python 3.10 X | Y operator in explanation about Response Models. PR #5307 by @MendyLanda. * Add link to New Relic article: "How to monitor FastAPI application performance using Python agent". PR #5260 by @sjyothi54. * Update docs for ORJSONResponse with details about improving performance. PR #2615 by @falkben. * Add docs for creating a custom Response class. PR #5331 by @tiangolo. * Add tip about using alias for form data fields. PR #5329 by @tiangolo. TranslationsP * Add Russian translation for docs/ru/docs/features.md. PR #5315 by @Xewus. * Update Chinese translation for docs/zh/docs/tutorial/ request-files.md. PR #4529 by @ASpathfinder. * Add Chinese translation for docs/zh/docs/tutorial/encoder.md. PR #4969 by @Zssaer. * Fix MkDocs file line for Portuguese translation of background-task.md. PR #5242 by @ComicShrimp. InternalP * Update FastAPI People. PR #5347 by @github-actions[bot]. * Bump dawidd6/action-download-artifact from 2.22.0 to 2.23.0. PR #5321 by @dependabot[bot]. * [pre-commit.ci] pre-commit autoupdate. PR #5318 by @pre-commit-ci[bot]. * Fix a small code highlight line error. PR #5256 by @hjlarry. * [?] Internal small refactor, move operation_id parameter position in delete method for consistency with the code. PR #4474 by @hiel . * Update sponsors, disable ImgWhale. PR #5338 by @tiangolo. 0.81.0P FeaturesP * Add ReDoc