NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #60 most downloaded on PyPI
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Last release 1 months ago
29 Jul 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
317 releases · first in 2018
⬆ Upgrade Starlette from 0.18.0 to 0.19.0. PR #4488 by @Kludex.
JSONResponse the content argument is now required.TestClient. PR #4389 by @rgilton.docs/en/docs/tutorial/sql-databases.md. PR #4875 by @wpyoga.docs/en/docs/async.md. PR #4726 by @Prezu.docs/zh/docs/tutorial/query-params-str-validations.md. PR #4237 by @caimaoy.docs/pt/docs/tutorial/path-params.md. PR #4722 by @CleoMenezesJr.docs/pt/docs/tutorial/cookie-params.md. PR #4112 by @lbmendes.docs/tutorial/body.md. PR #4332 by @Smlep.docs/ja/docs/advanced/conditional-openapi.md. PR #2631 by @sh0nk.docs/ja/docs/tutorial/body.md. PR #3062 by @a-takahashi223.docs/pt/docs/tutorial/background-tasks.md. PR #2170 by @izaguerreiro.docs/deployment/deta.md. PR #4442 by @lsglucas.docs/async.md. PR #4036 by @Winand.docs/tutorial/body.md. PR #3960 by @leandrodesouzadev.tutorial/extra-data-types.md. PR #4077 by @luccasmmg.docs/features.md. PR #3905 by @jomue.One column per quarter.
⬆ Upgrade Starlette from 0.17.1 to 0.18.0. PR #4483 by @Kludex.
⬆️ Update ujson ranges for CVE-2021-45958. PR #4804 by @tiangolo.
This release includes upgrades to third-party packages that handle security issues. Although there's a chance these issues don't affect you in particular, please upgrade as soon as possible.
ValidationError JSON Schema. PR #4806 by @tiangolo.ValidationError at field loc. PR #3810 by @dconathan./docs) publicly to non-expert users. PR #4347 by @RAlanWright.🌐 Start Dutch translations. PR #4703 by @tiangolo.
✨ Add support for custom generate_unique_id_function and docs for generating clients. New docs: Advanced - Generate Clients. PR #4650 by @tiangolo.
generate_unique_id_function and docs for generating clients. New docs: Advanced - Generate Clients. PR #4650 by @tiangolo.✨ Include route in scope to allow middleware and other tools to extract its information. PR #4603 by @tiangolo.
✨ Update internal AsyncExitStack to fix context for dependencies with yield. PR #4575 by @tiangolo.
Dependencies with yield can now catch HTTPException and custom exceptions. For example:
async def get_database():
with Session() as session:
try:
yield session
except HTTPException:
session.rollback()
raise
finally:
session.close()
After the dependency with yield handles the exception (or not) the exception is raised again. So that any exception handlers can catch it, or ultimately the default internal ServerErrorMiddleware.
If you depended on exceptions not being received by dependencies with yield, and receiving an exception breaks the code after yield, you can use a block with try and finally:
async def do_something():
try:
yield something
finally:
some_cleanup()
...that way the finally block is run regardless of any exception that might happen.
contextvars context for the code before and after yield. This was the main objective of that PR.This means that now, if you set a value in a context variable before yield, the value would still be available after yield (as you would intuitively expect). And it also means that you can reset the context variable with a token afterwards.
For example, this works correctly now:
from contextvars import ContextVar
from typing import Any, Dict, Optional
legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar(
"legacy_request_state_context_var", default=None
)
async def set_up_request_state_dependency():
request_state = {"user": "deadpond"}
contextvar_token = legacy_request_state_context_var.set(request_state)
yield request_state
legacy_request_state_context_var.reset(contextvar_token)
...before this change it would raise an error when resetting the context variable, because the contextvars context was different, because of the way it was implemented.
Note: You probably don't need contextvars, and you should probably avoid using them. But they are powerful and useful in some advanced scenarios, for example, migrating from code that used Flask's g semi-global variable.
Technical Details: If you want to know more of the technical details you can check out the PR description #4575.
✨ Add support for declaring UploadFile parameters without explicit File(). PR #4469 by @tiangolo. New docs: Request Files - File Parameters with Uploa
UploadFile parameters without explicit File(). PR #4469 by @tiangolo. New docs: Request Files - File Parameters with UploadFile.Query, Cookie, Header, and Path parameters. PR #3144 by @astraldawn. New docs: Query Parameters and String Validations - Exclude from OpenAPI.jsonable_encoder. PR #2061 by @viveksunder.
✨ Enable configuring Swagger UI parameters. Original PR #2568 by @jmriebold. Here are the new docs: Configuring Swagger UI.
docs/help-fastapi.md. PR #3847 by @jaystone776.docs/ko/docs/index.md. PR #4195 by @kty4119.docs/pl/docs/index.md. PR #4245 by @MicroPanda123.docs\tutorial\path-operation-configuration.md. PR #3312 by @jaystone776.✨ Add docs and tests for Python 3.9 and Python 3.10. PR #3712 by @tiangolo.
There's nothing interesting in this particular FastAPI release. It is mainly to enable/unblock the release of the next version of Pydantic that comes
There's nothing interesting in this particular FastAPI release. It is mainly to enable/unblock the release of the next version of Pydantic that comes packed with features and improvements. 🤩
docs/tutorial/request-forms-and-files.md. PR #3744 by @NinaHwang.docs/tutorial/request-files.md. PR #3743 by @NinaHwang.docs/tutorial/query-params-str-validations.md. PR #3965 by @leandrodesouzadev.docs/tutorial/response-status-code.md. PR #3742 by @NinaHwang.docs/ko/docs/deployment/versions.md. PR #4121 by @DevDae.docs/ko/docs/tutorial/index.md. PR #4193 by @kimjaeyoonn.docs/tutorial/dependencies/classes-as-dependencies: Add type of query parameters in a description of Classes as dependencies. PR #4015 by @0417taehyun.docs/tutorial/path-params.md. PR #3548 by @Smlep.docs/tutorial/query-params.md. PR #3556 by @Smlep.docs/python-types.md. PR #3926 by @BilalAlpaslan.This release just upgrades Starlette to the latest version, 0.16.0, which includes several bug fixes and some small breaking changes.
This release just upgrades Starlette to the latest version, 0.16.0, which includes several bug fixes and some small breaking changes.
These last three consecutive releases are independent so that you can migrate gradually:
0.68.2, with no breaking changes, but upgrading all the sub-dependencies.0.69.0, which upgrades Starlette to 0.15.0, with AnyIO support, and a higher chance of having breaking changes in your code.0.70.0, just upgrading Starlette to the latest version 0.16.0 with additional bug fixes.This way, in case there was a breaking change for your code in one of the releases, you can still benefit from the previous upgrades. ✨
Also upgrades the ranges of optional dependencies:
"jinja2 >=2.11.2,<4.0.0""itsdangerous >=1.1.0,<3.0.0"🔧 Correct DeprecationWarning config and comment in pytest settings. PR #4008 by @graingert.
This release adds support for Trio. ✨
It upgrades the version of Starlette to 0.15.0, now based on AnyIO, and the internal async components in FastAPI are now based on AnyIO as well, making it compatible with both asyncio and Trio.
You can read the docs about running FastAPI with Trio using Hypercorn.
This release also removes graphene as an optional dependency for GraphQL. If you need to work with GraphQL, the recommended library now is Strawberry. You can read the new FastAPI with GraphQL docs.
0.15.0. PR #3372 by @graingert.graphene as an optional dependency. PR #4007 by @tiangolo.docs/en/docs/contributing.md. PR #3752 by @NinaHwang.docs/en/docs/advanced/path-operation-advanced-configuration.md and docs/en/docs/release-notes.md. PR #3750 by @saintmalik.docs/en/docs/help-fastapi.md. PR #3760 by @jaystone776.docs/en/docs/tutorial/bigger-applications.md. PR #3285 by @HolyDorus.docs/en/docs/tutorial/testing.md. PR #3382 by @Bharat123rox.docs/en/docs/advanced/templates.md. PR #3211 by @oerpli.docs/en/docs/tutorial/request-files.md. PR #2803 by @gsganden.docs/tutorial/handling-errors.md. PR #2700 by @graue70.docs/fastapi-people.md. PR #3848 by @BilalAlpaslan.docs/ja/docs/deployment/docker.md. PR #3245 by @utamori.This release has no breaking changes. 🎉
This release has no breaking changes. 🎉
It upgrades the version ranges of sub-dependencies to allow applications using FastAPI to easily upgrade them.
Soon there will be a new FastAPI release upgrading Starlette to take advantage of recent improvements, but as that has a higher chance of having breaking changes, it will be in a separate release.
docs/features.md. PR #1950 by @ycd.docs/benchmarks.md. PR #2729 by @Telomeraz.docs/index.md. PR #1908 by @ycd.docs/tutorial/body.md. PR #3671 by @Smlep.deployment/docker.md. PR #3694 by @rjNemo.docs/tutorial/path-params.md. PR #3664 by @FelipeSilva93.docs/deployment/https.md. PR #3754 by @lsglucas.docs/features.md. PR #3699 by @mawassk.autoflake, supporting multi-line imports. PR #3988 by @tiangolo.✨ Add support for read_with_orm_mode, to support SQLModel relationship attributes. PR #3757 by @tiangolo.
read_with_orm_mode, to support SQLModel relationship attributes. PR #3757 by @tiangolo.docs/fastapi-people.md. PR #3461 by @ComicShrimp.docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR #3492 by @jaystone776.docs/tutorial/dependencies/sub-dependencies.md. PR #3491 by @jaystone776.docs/advanced/index.md. PR #3460 by @ComicShrimp.docs/async.md. PR #1330 by @Serrones.docs/async.md. PR #3416 by @Smlep.✨ Add support for extensions and updates to the OpenAPI schema in each *path operation*. New docs: FastAPI Path Operation Advanced Configuration - Ope
FastAPI class, shown on the automatic API docs UI. New docs: Metadata and Docs URLs. Initial PR #1812 by @dkreeft.description parameter to all the security scheme classes, e.g. APIKeyQuery(name="key", description="A very cool API key"). PR #1757 by @hylkepostma.fastapi.datastructures. Initial PR #1872 by @jamescurtin.docs/python-types.md. PR #3039 by @dukkee.docs/tutorial/dependencies/index.md. PR #3489 by @jaystone776.docs/external-links.md. PR #3036 by @dukkee.docs/tutorial/dependencies/global-dependencies.md. PR #3493 by @jaystone776.docs/deployment/versions.md. PR #3618 by @lsglucas.docs/tutorial/security/oauth2-jwt.md. PR #3526 by @sattosan.✨ Add support for dataclasses in request bodies and response_model. New documentation: Advanced User Guide - Using Dataclasses. PR #3577 by @tiangolo.
dataclasses in request bodies and response_model. New documentation: Advanced User Guide - Using Dataclasses. PR #3577 by @tiangolo.dataclasses in responses. PR #3576 by @tiangolo, continuation from initial PR #2722 by @amitlissack.body-nested-models.md. PR #3463 by @jaystone776.body-nested-models.md. PR #3462 by @jaystone776.docs/en/docs/tutorial/schema-extra-example.md. PR #3362 by @dbrakman.🌐 Add basic setup for German translations. PR #3522 by @0x4Dark.
docs/tutorial/security/index.md. PR #3507 by @oandersonmagalhaes.docs/deployment/index.md. PR #3337 by @lsglucas.>=6.2.4,<7.0.0 and pytest-cov to >=2.12.0,<3.0.0. Initial PR #2790 by @graingert.>=3.3.0,<4.0.0 for tests. PR #3468 by @tiangolo.✨ Allow setting the response_class to RedirectResponse or FileResponse and returning the URL from the function. New and updated docs are in the tutori
response_class to RedirectResponse or FileResponse and returning the URL from the function. New and updated docs are in the tutorial section Custom Response - HTML, Stream, File, others, in RedirectResponse and in FileResponse. PR #3457 by @tiangolo.jsonable_encoder. PR #2016 by @Rubikoid.tutorial/query-params.md. PR #2243 by @mariacamilagl.advanced/response-directly.md. PR #1253 by @jfunez.advanced/additional-status-codes.md. PR #1252 by @jfunez.advanced/path-operation-advanced-configuration.md. PR #1251 by @jfunez.♻ Assume request bodies contain JSON when no Content-Type header is provided. This fixes a breaking change introduced by 0.65.2 with PR #2118. It shou…
Content-Type header. And there's still protection against CSRFs. PR #3456 by @tiangolo.typer-cli to >=0.0.12 to fix conflicts. PR #3429 by @tiangolo.This change fixes a CSRF security vulnerability when using cookies for authentication in path operations with JSON payloads sent by browsers.
This change fixes a CSRF security vulnerability when using cookies for authentication in path operations with JSON payloads sent by browsers.
In versions lower than 0.65.2, FastAPI would try to read the request payload as JSON even if the content-type header sent was not set to application/json or a compatible JSON media type (e.g. application/geo+json).
So, a request with a content type of text/plain containing JSON data would be accepted and the JSON data would be extracted.
But requests with content type text/plain are exempt from CORS preflights, for being considered Simple requests. So, the browser would execute them right away including cookies, and the text content could be a JSON string that would be parsed and accepted by the FastAPI application.
See CVE-2021-32677 for more details.
Thanks to Dima Boger for the security report! 🙇🔒
📌 Upgrade pydantic pin, to handle security vulnerability CVE-2021-29510. PR #3213 by @tiangolo.
⬆️ Upgrade Starlette to 0.14.2, including internal UJSONResponse migrated from Starlette. This includes several bug fixes and features from Starlette.
0.14.2, including internal UJSONResponse migrated from Starlette. This includes several bug fixes and features from Starlette. PR #2335 by @hanneskuettner.overrides boilerplate. PR #3202 by @tiangolo.✨ Add support for adding multiple examples in request bodies and path, query, cookie, and header params. New docs: Declare Request Example Data. Initi
examples in request bodies and path, query, cookie, and header params. New docs: Declare Request Example Data. Initial PR #1267 by @austinorr.✨ Improve type annotations, add support for mypy --strict, internally and for external packages. PR #2547 by @tiangolo.
fastapi[all] to the latest version including uvloop, the new range is uvicorn[standard] >=0.12.0,<0.14.0. PR #2548 by @tiangolo.callbacks parameters and when using the OAuth2 class.deprecated: to mark all the *path operations* as deprecated. 🤷
Up to now, for several options, the only way to apply them to a group of path operations was in include_router. That works well, but the call to app.include_router() or router.include_router() is normally done in another file.
That means that, for example, to apply authentication to all the path operations in a router it would end up being done in a different file, instead of keeping related logic together.
Setting options in include_router still makes sense in some cases, for example, to override or increase configurations from a third party router included in an app. But in a router that is part of a bigger application, it would probably make more sense to add those settings when creating the APIRouter.
In FastAPI
This allows setting the (mostly new) parameters (additionally to the already existing parameters):
default_response_class: updated to handle defaults in APIRouter and include_router.dependencies: to include ✨ top-level dependencies ✨ that apply to the whole application. E.g. to add global authentication.callbacks: OpenAPI callbacks that apply to all the path operations.deprecated: to mark all the path operations as deprecated. 🤷include_in_schema: to allow excluding all the path operations from the OpenAPI schema.responses: OpenAPI responses that apply to all the path operations.For example:
from fastapi import FastAPI, Depends
async def some_dependency():
return
app = FastAPI(dependencies=[Depends(some_dependency)])
In APIRouter
This allows setting the (mostly new) parameters (additionally to the already existing parameters):
default_response_class: updated to handle defaults in APIRouter and include_router. For example, it's not needed to set it explicitly when creating callbacks.dependencies: to include ✨ router-level dependencies ✨ that apply to all the path operations in a router. Up to now, this was only possible with include_router.callbacks: OpenAPI callbacks that apply to all the path operations in this router.deprecated: to mark all the path operations in a router as deprecated.include_in_schema: to allow excluding all the path operations in a router from the OpenAPI schema.responses: OpenAPI responses that apply to all the path operations in a router.prefix: to set the path prefix for a router. Up to now, this was only possible when calling include_router.tags: OpenAPI tags to apply to all the path operations in this router.For example:
from fastapi import APIRouter, Depends
async def some_dependency():
return
router = APIRouter(prefix="/users", dependencies=[Depends(some_dependency)])
In include_router
Most of these settings are now supported in APIRouter, which normally lives closer to the related code, so it is recommended to use APIRouter when possible.
But include_router is still useful to, for example, adding options (like dependencies, prefix, and tags) when including a third party router, or a generic router that is shared between several projects.
This PR allows setting the (mostly new) parameters (additionally to the already existing parameters):
default_response_class: updated to handle defaults in APIRouter and FastAPI.deprecated: to mark all the path operations in a router as deprecated in OpenAPI.include_in_schema: to allow disabling all the path operations from showing in the OpenAPI schema.callbacks: OpenAPI callbacks that apply to all the path operations in this router.Note: all the previous parameters are still there, so it's still possible to declare dependencies in include_router.
tags in include_router and path operations was updated for consistency, but it's a simple order change.route.response_class, or the router.default_response_class, or the app.default_response_class: the default value for response_class in APIRoute and for default_response_class in APIRouter and FastAPI is now a DefaultPlaceholder used internally to handle and solve default values and overrides. The actual response class inside the DefaultPlaceholder is available at route.response_class.value.PR #2434 (above) includes new or updated docs:
📝 Add FastAPI monitoring blog post to External Links. PR #2324 by @louisguitton.
📌 Relax Swagger UI version pin. PR #2089 by @jmriebold.
content_type typo. PR #2135 by @TeoZosa.Fix issues using jsonable_encoder with SQLAlchemy models directly. PR #1987.
jsonable_encoder with SQLAlchemy models directly. PR #1987.Remove support for deprecated Pydantic 0.32.2 . This improves maintainability and allows new features.
Add support for injecting HTTPConnection (as Request and WebSocket ). Useful for sharing app state in dependencies. PR #1827 by @nsidnev .
Export WebSocketDisconnect and add example handling WebSocket disconnections to docs. PR #1822 by @rkbeatss .
Require Pydantic > 1.0.0 .
Remove support for deprecated Pydantic 0.32.2 . This improves maintainability and allows new features.
In FastAPI and APIRouter :
Remove path operation decorators related/deprecated parameter response_model_skip_defaults (use response_model_exclude_unset instead).
Change path operation decorators parameter default for response_model_exclude from set() to None (as is in Pydantic).
In encoders.jsonable_encoder :
Remove deprecated skip_defaults , use instead exclude_unset .
Set default of exclude from set() to None (as is in Pydantic).
PR #1862 .
In encoders.jsonable_encoder remove parameter sqlalchemy_safe .
It was an early hack to allow returning SQLAlchemy models, but it was never documented, and the recommended way is using Pydantic's orm_mode as described in the tutorial: SQL (Relational) Databases .
PR #1864 .
Add link to the course by TestDriven.io: Test-Driven Development with FastAPI and Docker . PR #1860 .
Fix empty log message in docs example about handling errors. PR #1815 by @manlix .
Reword text to reduce ambiguity while not being gender-specific. PR #1824 by @Mause .
Add Flake8 linting. Original PR #1774 by @MashhadiNima .
Disable Gitter bot, as it's currently broken, and Gitter's response doesn't show the problem. PR #1853 .
Fix typo in docs for query parameters. PR #1832 by @ycd.
Form, File) without having python-multipart installed.
python-multipart is installed instead of the incorrect multipart (both importable as multipart).json_encoders. PR #1769 by @henrybetts.jsonable_encoder. PR #1754 by @MashhadiNima.Optional parameters. PR #1731 by @MashhadiNima.**extra parameters in FastAPI. PR #1659 by @bharel.Upgrade Starlette to version 0.13.6 to handle a vulnerability when using static files in Windows. PR #1759 by @jamesag26.
0.13.6 to handle a vulnerability when using static files in Windows. PR #1759 by @jamesag26.Add GitHub Action to watch for missing preview docs and trigger a preview deploy. PR #1740.
Fix typo in docstring for OAuth2 utils. PR #1621 by @tomarv2.
servers when there's a root_path instead of prefixing all the paths:
FastAPI classes: root_path_in_servers to disable the auto-generation of servers.root_path and servers in Additional Servers.tokenUrl="token" to make sure those examples keep working as-is even when behind a reverse proxy.Add link in docs to Pydantic data types. PR #1612 by @tayoogunbiyi.
openapi_prefix. PR #1611 by @bavaria95..gitignore for contributors using Vim. PR #1590 by @asheux.Optional in all the examples in the docs. Original PR #1574 by @chrisngyn, @kx-chen, @YKo20010. Updated and merged PR #1644.response_model_by_alias. PR #1642.Deep merge OpenAPI responses to preserve all the additional metadata. PR #1577.
not as a JSON Schema instead of a list. PR #1548 by @v-do.servers. PR #1547 by @mikaello.Remove broken link from "External Links". PR #1565 by @victorphoenix3.
http.HTTPStatus in status_code parameters. PR #1534 by @retnikt.__root__, use the internal value in jsonable_encoder. PR #1524 by @patrickkwang.showCommonExtensions in Swagger UI to show additional validations like maxLength, etc. PR #1466 by @TiewKH.OAuth2PasswordRequestFormStrict importable directly from fastapi.security. PR #1462 by @RichardHoekstra.response_model_exclude_defaults and response_model_exclude_none in Response Model. PR #1427 by @wshayes.0.13.4. PR #1361 by @rushton.__repr__ for path operation function parameter helpers (like Query, Depends, etc) to simplify debugging. PR #1560 by @rkbeatss and @victorphoenix3.Add link to advanced docs from tutorial. PR #1512 by @kx-chen.
Optional. Original PR #1377 by @yaegassy.yield. PR #1365 by @mrosales.get_path_param_names(). PR #1243 by @heckad.*, from functions in docs where it's not needed. PR #1239 by @pankaj-giri.Deprecate openapi_prefix parameter in favor of the new root_path parameter.
root_path:
root_path internally for mounted applications, so that OpenAPI and the docs UI works automatically without extra configurations and parameters.root_path parameter for FastAPI applications to provide it in cases where it can be set with the command line (e.g. for Uvicorn and Hypercorn, with the parameter --root-path).openapi_prefix parameter in favor of the new root_path parameter.openapi_prefix (as it is now handled automatically).root_path.openapi_prefix parameter passed (internally generated from root_path).Fix handling of enums with their own schema in path parameters. To support samuelcolvin/pydantic#1432 in FastAPI. PR #1463.
Allow enums to allow them to have their own schemas in OpenAPI. To support samuelcolvin/pydantic#1432 in FastAPI. PR #1461.
max_age=600. PR #1301 by @derekbekoe.* in short features in the docs is consistent (after .) in all languages. PR #1424.get_db in SQLAlchemy tutorial. PR #1293 by @bcb.Add translation to Spanish for Concurrency and async / await - Concurrencia y async / await. PR #1290 by @alvaropernas.
openapi_url=None. New example in docs: Advanced: Conditional OpenAPI. PR #1421.Update database test setup. PR #1226.
Deprecate the parameter include_none in jsonable_encoder and add the inverted exclude_none, to keep in sync with Pydantic.
response_model_exclude_defaults and response_model_exclude_none:
env to .gitignore. PR #1212 by @cassiobotaro.Settings using a dependency with @lru_cache(). PR #1214.Fix automatic embedding of body fields for dependencies and sub-dependencies. Original PR #1079 by @Toad2186.
Fix included example after translations refactor. PR #1182.
example in Field. Docs at Body - Fields: JSON Schema extras. PR #1106 by @JohnPaton.response_model. PR #1164 by @voegtlel.Update test coverage badge. PR #1175.
orjson to pip install fastapi[all]. PR #1161 by @michael0liver.GZipMiddleware. PR #1138 by @arimbr.OAuth2PasswordRequestFormStrict. PR #1126 by @adg-mh.by_alias or exclude_unset and returning data with Pydantic models. PR #1074 by @juhovh-aiven.127.0.0.1 to improve Windows support. PR #1169 by @mariacamilagl.Add new high-performance JSON response class using orjson. New docs: Custom Response - HTML, Stream, File, others: `ORJSONResponse`. PR #1065.
orjson. New docs: Custom Response - HTML, Stream, File, others: ORJSONResponse. PR #1065.Re-export utils from Starlette:
from fastapi.responses import JSONResponse instead of from starlette.responses import JSONResponse.Request, Response, WebSocket, status can be imported directly from fastapi as in from fastapi import Response. This is because those are frequently used, to use the request directly, to set headers and cookies, to get status codes, etc.Add link to Release Notes from docs about pinning versions for deployment. PR #1058.
/."startup", and "shutdown".Fix links in release notes. PR #1052 by @sattosan.
serialize_response parameter name to avoid confusion. PR #1031 by @patrickmckenna.List[int]. PR #1017 by @patrickmckenna.Fix path operation duplicated parameters when used in dependencies and the path operation function. PR #994 by @merowinger92.
Fix encoding of pathlib paths in jsonable_encoder. PR #978 by @patrickmckenna.
pathlib paths in jsonable_encoder. PR #978 by @patrickmckenna.yield. PR #986.yield and HTTPException. PR #985.callables in path operation functions, like functions modified with functools.partial. PR #977.Run linters first in tests to error out faster. PR #948.
email-validator only when used. PR #946.yield. PR #947.Any type for enums in OpenAPI. PR #906 by @songzhi.Fix model filtering in response_model, cloning sub-models. PR #889.
Refactor documentation to make a simpler and shorter Tutorial - User Guide and an additional Advanced User Guide with all the additional docs. PR #887
username and password. PR #865 by @isaevpd.list, tuple, etc. PR #856 by @nsidnev.body to RequestValidationError, new docs: Use the RequestValidationError body. Initial PR #853 by @aviramha.fastapi topic. PR #850.contextvars handling in docs: SQL (Relational) Databases with Peewee. PR #879.Fix typos and tweak configs. PR #837.
OAuth2AuthorizationCodeBearer class. PR #797 by @kuwv.jsonable_encoder, e.g. asyncpg's UUIDs. PR #756 by @RmStorm.HttpUrl in docs. PR #832 by @Dustyposa.Add support for OpenAPI Callbacks:
operationIds to be valid Python names (also valid variables in most languages).default_response_class parameter to APIRouter.body-schema to body-fields to keep in line with Pydantic. PR #746 by @prostomarkeloff.Add GitHub social preview images to git. PR #752.
Add support for Pydantic versions 1.0.0 and above, with temporary (deprecated) backwards compatibility for Pydantic 0.32.2. PR #646 by @dmontagu.
custom_encoder in jsonable_encoder. PR #715 by @matrixise.APIRouter docs. PR #698 by @marier-nico.1.0.0 and above, with temporary (deprecated) backwards compatibility for Pydantic 0.32.2. PR #646 by @dmontagu.Update docs to reduce gender bias. PR #645 by @ticosax.
operationId for all the path operations based on their function name. PR #642 by @SKalt.$ from Bash code blocks in docs for consistency. PR #613 by @nstapelbroek.black linting after upgrade. PR #682 by @frankie567.Your coding agent can read these notes before it upgrades. Set up the MCP server →