Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Join theFastAPI Cloud waiting list 🚀
Follow@fastapi onX (Twitter) to stay updated
FollowFastAPI onLinkedIn to stay updated
Subscribe to theFastAPI and friends newsletter 🎉
sponsor
sponsor
sponsor
sponsor
sponsor
sponsor
sponsor
sponsor
sponsor
sponsor
sponsor

Release Notes

Latest Changes

Docs

  • 🔨 Add Kapa.ai widget (AI chatbot). PR#14938 by@tiangolo.
  • 🔥 Remove Python 3.9 specific files, no longer needed after updating translations. PR#14931 by@tiangolo.
  • 📝 Update docs for JWT to prevent timing attacks. PR#14908 by@tiangolo.

Translations

Internal

0.129.0

Breaking Changes

Refactors

Docs

Internal

  • 🔨 Update docs.py scripts to migrate Python 3.9 to Python 3.10. PR#14906 by@tiangolo.

0.128.8

Docs

Internal

  • 🔨 Tweak PDM hook script. PR#14895 by@tiangolo.
  • ♻️ Update build setup forfastapi-slim, deprecate it, and make it only depend onfastapi. PR#14894 by@tiangolo.

0.128.7

Features

Refactors

  • ♻️ Simplify reading files in memory, do it sequentially instead of (fake) parallel. PR#14884 by@tiangolo.

Docs

Internal

0.128.6

Fixes

Translations

Internal

0.128.5

Refactors

  • ♻️ Refactor and simplify Pydantic v2 (and v1) compatibility internal utils. PR#14862 by@tiangolo.

Internal

  • ✅ Add inline snapshot tests for OpenAPI before changes from Pydantic v2. PR#14864 by@tiangolo.

0.128.4

Refactors

  • ♻️ Refactor internals, simplify Pydantic v2/v1 utils,create_model_field, better types forlenient_issubclass. PR#14860 by@tiangolo.
  • ♻️ Simplify internals, remove Pydantic v1 only logic, no longer needed. PR#14857 by@tiangolo.
  • ♻️ Refactor internals, cleanup unneeded Pydantic v1 specific logic. PR#14856 by@tiangolo.

Translations

Internal

0.128.3

Refactors

  • ♻️ Re-implementon_event in FastAPI for compatibility with the next Starlette, while keeping backwards compatibility. PR#14851 by@tiangolo.

Upgrades

  • ⬆️ Upgrade Starlette supported version range tostarlette>=0.40.0,<1.0.0. PR#14853 by@tiangolo.

Translations

Internal

  • 👷 Run tests with Starlette from git. PR#14849 by@tiangolo.
  • 👷 Run tests with lower bound uv sync, upgradefastapi[all] minimum dependencies:ujson >=5.8.0,orjson >=3.9.3. PR#14846 by@tiangolo.

0.128.2

Features

Fixes

Docs

Translations

Internal

0.128.1

Features

  • ✨ Addviewport meta tag to improve Swagger UI on mobile devices. PR#14777 by@Joab0.
  • 🚸 Improve error message for invalid query parameter type annotations. PR#14479 by@retwish.

Fixes

  • 🐛 UpdateValidationError schema to includeinput andctx. PR#14791 by@jonathan-fulton.
  • 🐛 Fix TYPE_CHECKING annotations for Python 3.14 (PEP 649). PR#14789 by@mgu.
  • 🐛 Strip whitespaces fromAuthorization header credentials. PR#14786 by@WaveTheory1.
  • 🐛 Fix OpenAPI duplication ofanyOf refs for app-level responses with specifiedcontent andmodel asUnion. PR#14463 by@DJMcoder.

Refactors

Docs

Translations

Internal

0.128.0

Breaking Changes

Internal

0.127.1

Refactors

Docs

Translations

Internal

0.127.0

Breaking Changes

Translations

  • 🔧 Add LLM prompt file for Korean, generated from the existing translations. PR#14546 by@tiangolo.
  • 🔧 Add LLM prompt file for Japanese, generated from the existing translations. PR#14545 by@tiangolo.

Internal

  • ⬆️ Upgrade OpenAI model for translations to gpt-5.2. PR#14579 by@tiangolo.

0.126.0

Upgrades

  • ➖ Drop support for Pydantic v1, keeping short temporary support for Pydantic v2'spydantic.v1. PR#14575 by@tiangolo.
    • The minimum version of Pydantic installed is nowpydantic >=2.7.0.
    • Thestandard dependencies now includepydantic-settings >=2.0.0 andpydantic-extra-types >=2.0.0.

Docs

Translations

  • 🔧 Add LLM prompt file for Ukrainian, generated from the existing translations. PR#14548 by@tiangolo.

Internal

0.125.0

Breaking Changes

  • 🔧 Drop support for Python 3.8. PR#14563 by@tiangolo.
    • This would actually not be abreaking change as no code would really break. Any Python 3.8 installer would just refuse to install the latest version of FastAPI and would only install 0.124.4. Only marking it as a "breaking change" to make it visible.

Refactors

Docs

Translations

Internal

  • ⬆ Bumpmarkdown-include-variants from 0.0.7 to 0.0.8. PR#14556 by@YuriiMotov.
  • 🔧 Temporarily disable translations still in progress, being migrated to the new LLM setup. PR#14555 by@YuriiMotov.
  • 🔧 Update test workflow config, remove commented code. PR#14540 by@tiangolo.
  • 👷 Configure coverage, error on main tests, don't wait for Smokeshow. PR#14536 by@tiangolo.
  • 👷 Run Smokeshow always, even on test failures. PR#14538 by@tiangolo.
  • 👷 Make Pydantic versions customizable in CI. PR#14535 by@tiangolo.
  • 👷 Fix checkout GitHub Action fetch-depth for LLM translations, enable cron monthly. PR#14531 by@tiangolo.
  • 👷 Fix Typer command for CI LLM translations. PR#14530 by@tiangolo.
  • 👷 Update LLM translation CI, add language matrix and extra commands, prepare for scheduled run. PR#14529 by@tiangolo.
  • 👷 Update github-actions user for GitHub Actions workflows. PR#14528 by@tiangolo.
  • ➕ Add requirements for translations. PR#14515 by@tiangolo.

0.124.4

Fixes

0.124.3

Fixes

  • 🐛 Fix support for tagged union with discriminator inside ofAnnotated withBody(). PR#14512 by@tiangolo.

Refactors

Docs

  • 📝 Tweak links format. PR#14505 by@tiangolo.
  • 📝 Update docs about re-raising validation errors, do not include string as is to not leak information. PR#14487 by@tiangolo.
  • 🔥 Remove external links section. PR#14486 by@tiangolo.

Translations

Internal

  • 👷 Tweak coverage to not pass Smokeshow max file size limit. PR#14507 by@tiangolo.
  • ✅ Expand test matrix to include Windows and MacOS. PR#14171 by@svlandeg.

0.124.2

Fixes

  • 🐛 Fix support forif TYPE_CHECKING, non-evaluated stringified annotations. PR#14485 by@tiangolo.

0.124.1

Fixes

  • 🐛 Fix handling arbitrary types when usingarbitrary_types_allowed=True. PR#14482 by@tiangolo.

Docs

Internal

  • ✅ Add test for Pydantic v2, dataclasses, UUID, and__annotations__. PR#14477 by@tiangolo.

0.124.0

Features

Internal

0.123.10

Fixes

  • 🐛 Fix using class (not instance) dependency that has__call__ method. PR#14458 by@YuriiMotov.
  • 🐛 Fixseparate_input_output_schemas=False withcomputed_field. PR#14453 by@YuriiMotov.

0.123.9

Fixes

  • 🐛 Fix OAuth2 scopes in OpenAPI in extra corner cases, parent dependency with scopes, sub-dependency security scheme without scopes. PR#14459 by@tiangolo.

0.123.8

Fixes

  • 🐛 Fix OpenAPI security scheme OAuth2 scopes declaration, deduplicate security schemes with different scopes. PR#14455 by@tiangolo.

0.123.7

Fixes

  • 🐛 Fix evaluating stringified annotations in Python 3.10. PR#11355 by@chaen.

0.123.6

Fixes

  • 🐛 Fix support for functools wraps and partial combined, for async and regular functions and classes in path operations and dependencies. PR#14448 by@tiangolo.

0.123.5

Features

  • ✨ Allow using dependables withfunctools.partial(). PR#9753 by@lieryan.
  • ✨ Add support for wrapped functions (e.g.@functools.wraps()) used with forward references. PR#5077 by@lucaswiman.
  • ✨ Handle wrapped dependencies. PR#9555 by@phy1729.

Fixes

  • 🐛 Fix optional sequence handling with new union syntax from Python 3.10. PR#14430 by@Viicos.

Refactors

  • 🔥 Remove dangling extra conditional no longer needed. PR#14435 by@tiangolo.
  • ♻️ Refactor internals, updateis_coroutine check to reuse internal supported variants (unwrap, check class). PR#14434 by@tiangolo.

Translations

0.123.4

Fixes

  • 🐛 Fix OpenAPI schema support for computed fields when usingseparate_input_output_schemas=False. PR#13207 by@vgrafe.

Docs

0.123.3

Fixes

  • 🐛 Fix Query\Header\Cookie parameter model alias. PR#14360 by@YuriiMotov.
  • 🐛 Fix optional sequence handling inserialize sequence value with Pydantic V2. PR#14297 by@YuriiMotov.

0.123.2

Fixes

  • 🐛 Fix unformatted{type_} in FastAPIError. PR#14416 by@Just-Helpful.
  • 🐛 Fix parsing extra non-body parameter list. PR#14356 by@YuriiMotov.
  • 🐛 Fix parsing extraForm parameter list. PR#14303 by@YuriiMotov.
  • 🐛 Fix support for form values with empty strings interpreted as missing (None if that's the default), for compatibility with HTML forms. PR#13537 by@MarinPostma.

Docs

  • 📝 Add tip on how to installpip in case ofNo module named pip error invirtual-environments.md. PR#14211 by@zadevhub.
  • 📝 Update Primary Key notes for the SQL databases tutorial to avoid confusion. PR#14120 by@FlaviusRaducu.
  • 📝 Clarify estimation note in documentation. PR#14070 by@SaisakthiM.

0.123.1

Fixes

  • 🐛 Avoid accessing non-existing "$ref" key for Pydantic v2 compat remapping. PR#14361 by@svlandeg.
  • 🐛 FixTypeError when encoding a decimal with aNaN orInfinity value. PR#12935 by@kentwelcome.

Internal

0.123.0

Fixes

  • 🐛 Cache dependencies that don't use scopes and don't have sub-dependencies with scopes. PR#14419 by@tiangolo.

0.122.1

Fixes

Docs

Internal

0.122.0

Fixes

  • 🐛 Use401 status code in security classes when credentials are missing. PR#13786 by@YuriiMotov.

Internal

  • 🔧 Configure labeler to exclude files that start from underscore forlang-all label. PR#14213 by@YuriiMotov.
  • 👷 Add pre-commit config with local script for permalinks. PR#14398 by@tiangolo.
  • 💄 Use font Fira Code to fix display of Rich panels in docs in Windows. PR#14387 by@tiangolo.
  • 👷 Add custom pre-commit CI. PR#14397 by@tiangolo.
  • ⬆ Bump actions/checkout from 5 to 6. PR#14381 by@dependabot[bot].
  • 👷 Upgradelatest-changes GitHub Action and pinactions/checkout@v5. PR#14403 by@svlandeg.
  • 🛠️ Addadd-permalinks andadd-permalinks-page toscripts/docs.py. PR#14033 by@YuriiMotov.
  • 🔧 Upgrade Material for MkDocs and remove insiders. PR#14375 by@tiangolo.

0.121.3

Refactors

  • ♻️ Make the result ofDepends() andSecurity() hashable, as a workaround for other tools interacting with these internal parts. PR#14372 by@tiangolo.

Upgrades

Docs

0.121.2

Fixes

  • 🐛 Fix handling of JSON Schema attributes named "$ref". PR#14349 by@tiangolo.

Docs

Translations

0.121.1

Fixes

  • 🐛 FixDepends(func, scope='function') for top level (parameterless) dependencies. PR#14301 by@luzzodev.

Docs

  • 📝 Update docs for advanced dependencies withyield, noting the changes in 0.121.0, addingscope. PR#14287 by@tiangolo.

Internal

0.121.0

Features

Internal

0.120.4

Fixes

  • 🐛 Fix security schemes in OpenAPI when added at the top level app. PR#14266 by@YuriiMotov.

0.120.3

Refactors

  • ♻️ Reduce internal cyclic recursion in dependencies, from 2 functions calling each other to 1 calling itself. PR#14256 by@tiangolo.
  • ♻️ Refactor internals of dependencies, simplify code and removeget_param_sub_dependant. PR#14255 by@tiangolo.
  • ♻️ Refactor internals of dependencies, simplify using dataclasses. PR#14254 by@tiangolo.

Docs

0.120.2

Fixes

  • 🐛 Fix separation of schemas with nested models introduced in 0.119.0. PR#14246 by@tiangolo.

Internal

0.120.1

Upgrades

Internal

  • 🔧 Addlicense andlicense-files topyproject.toml, removeLicense fromclassifiers. PR#14230 by@YuriiMotov.

0.120.0

There are no major nor breaking changes in this release. ☕️

The internal reference documentation now usesannotated_doc.Doc instead oftyping_extensions.Doc, this adds a new (very small) dependency onannotated-doc, a package made just to provide thatDoc documentation utility class.

I would expecttyping_extensions.Doc to be deprecated and then removed at some point fromtyping_extensions, for that reason there's the newannotated-doc micro-package. If you are curious about this, you can read more in the repo forannotated-doc.

This new version0.120.0 only contains that transition to the new home package for that utility classDoc.

Translations

Internal

0.119.1

Fixes

  • 🐛 Fix internal Pydantic v1 compatibility (warnings) for Python 3.14 and Pydantic 2.12.1. PR#14186 by@svlandeg.

Docs

  • 📝 Replacestarlette.io bystarlette.dev anduvicorn.org byuvicorn.dev. PR#14176 by@Kludex.

Internal

0.119.0

FastAPI now (temporarily) supports both Pydantic v2 models andpydantic.v1 models at the same time in the same app, to make it easier for any FastAPI apps still using Pydantic v1 to gradually but quicklymigrate to Pydantic v2.

fromfastapiimportFastAPIfrompydanticimportBaseModelasBaseModelV2frompydantic.v1importBaseModelclassItem(BaseModel):name:strdescription:str|None=NoneclassItemV2(BaseModelV2):title:strsummary:str|None=Noneapp=FastAPI()@app.post("/items/",response_model=ItemV2)defcreate_item(item:Item):return{"title":item.name,"summary":item.description}

Adding this feature was a big effort with the main objective of making it easier for the few applications still stuck in Pydantic v1 to migrate to Pydantic v2.

And with this, support forPydantic v1 is now deprecated and will beremoved from FastAPI in a future version soon.

Note: have in mind that the Pydantic team already stopped supporting Pydantic v1 for recent versions of Python, starting with Python 3.14.

You can read in the docs more about how toMigrate from Pydantic v1 to Pydantic v2.

Features

  • ✨ Add support forfrom pydantic.v1 import BaseModel, mixed Pydantic v1 and v2 models in the same app. PR#14168 by@tiangolo.

0.118.3

Upgrades

0.118.2

Fixes

  • 🐛 Fix tagged discriminated union not recognized as body field. PR#12942 by@frankie567.

Internal

0.118.1

Upgrades

Docs

  • 📝 Add External Link: Getting started with logging in FastAPI. PR#14152 by@itssimon.

Translations

Internal

0.118.0

Fixes

  • 🐛 Fix support forStreamingResponses with dependencies withyield orUploadFiles, close after the response is done. PR#14099 by@tiangolo.

Before FastAPI 0.118.0, if you used a dependency withyield, it would run the exit code after thepath operation function returned but right before sending the response.

This change also meant that if you returned aStreamingResponse, the exit code of the dependency withyield would have been already run.

For example, if you had a database session in a dependency withyield, theStreamingResponse would not be able to use that session while streaming data because the session would have already been closed in the exit code afteryield.

This behavior was reverted in 0.118.0, to make the exit code afteryield be executed after the response is sent.

You can read more about it in the docs forAdvanced Dependencies - Dependencies withyield,HTTPException,except and Background Tasks. Including what you could do if you wanted to close a database session earlier, before returning the response to the client.

Docs

  • 📝 Updatetutorial/security/oauth2-jwt/ to usepwdlib with Argon2 instead ofpasslib. PR#13917 by@Neizvestnyj.
  • ✏️ Fix typos in OAuth2 password request forms. PR#14112 by@alv2017.
  • 📝 Update contributing guidelines for installing requirements. PR#14095 by@alejsdev.

Translations

Internal

0.117.1

Fixes

0.117.0

Features

  • ✨ AllowNone as return type for bodiless responses. PR#9425 by@hofrob.
  • ✨ Allow array values for OpenAPI schematype field. PR#13639 by@sammasak.
  • ✨ Add OpenAPIexternal_docs parameter toFastAPI. PR#13713 by@cmtoro.

Fixes

  • ⚡️ Fixdefault_factory for response model field with Pydantic V1. PR#9704 by@vvanglro.
  • 🐛 Fix inconsistent processing of model docstring formfeed char with Pydantic V1. PR#6039 by@MaxwellPayne.
  • 🐛 Fixjsonable_encoder altersjson_encoders of Pydantic v1 objects. PR#4972 by@aboubacs.
  • 🐛 Reenableallow_arbitrary_types when only 1 argument is used on the API endpoint. PR#13694 by@rmawatson.
  • 🐛 Fixinspect.getcoroutinefunction() can break testing withunittest.mock.patch(). PR#14022 by@secrett2633.

Refactors

  • ♻️ Createdependency-cache dict insolve_dependencies only ifNone (don't re-create if empty). PR#13689 by@bokshitsky.
  • ✅ Enable test case for duplicated headers intest_tutorial/test_header_params/test_tutorial003.py. PR#13864 by@Amogha-ark.
  • 📌 Pinhttpx to>=0.23.0,<1.0.0. PR#14086 by@YuriiMotov.

Docs

  • 📝 Add note about Cookies and JavaScript ontutorial/cookie-params.md. PR#13510 by@Kludex.
  • 📝 Remove outdated formatting frompath-params-numeric-validations.md for languagesen,es anduk.. PR#14059 by@svlandeg.
  • 📝 Fix and Improve English Documentation. PR#14048 by@nilslindemann.

Translations

Internal

0.116.2

Upgrades

Docs

  • 📝 Add documentation for Behind a Proxy - Proxy Forwarded Headers, using--forwarded-allow-ips="*". PR#14028 by@tiangolo.
  • 📝 Add deprecation info block aboutdict() indocs/tutorial/body.md. PR#13906 by@jomkv.
  • 📝 Fix Twitter to be X (Twitter) everywhere in documentation. PR#13809 by@valentinDruzhinin.
  • 🐛 Prevent scroll-to-top on restart/fast buttons intermynal.js. PR#13714 by@Ashish-Pandey62.
  • 📝 Update testing events documentation. PR#13259 by@z0z0r4.
  • 📝 Remove obsoleteurl field in error responses in docs. PR#13655 by@Taoup.
  • 📝 Bring thescope claim in line with the standard indocs_src/security/tutorial005.py. PR#11189 by@DurandA.
  • 📝 Update TrustedHostMiddleware Documentation. PR#11441 by@soulee-dev.
  • 📝 Remove links to site callbackhell.com that doesn't exist anymore. PR#14006 by@dennybiasiolli.
  • 📝 Add permalinks to headers in English docs. PR#13993 by@YuriiMotov.
  • 📝 Updatedocs/en/docs/advanced/generate-clients.md. PR#13793 by@mrlubos.
  • 📝 Add discussion template for new language translation requests. PR#13535 by@alejsdev.

Translations

Internal

0.116.1

Upgrades

  • ⬆️ Upgrade Starlette supported version range to>=0.40.0,<0.48.0. PR#13884 by@tiangolo.

Docs

  • 📝 Add notification about impending changes in Translations todocs/en/docs/contributing.md. PR#13886 by@YuriiMotov.

Internal

0.116.0

Features

  • ✨ Add support for deploying to FastAPI Cloud withfastapi deploy. PR#13870 by@tiangolo.

Installingfastapi[standard] now includesfastapi-cloud-cli.

This will allow you to deploy toFastAPI Cloud with thefastapi deploy command.

If you want to installfastapi with the standard dependencies but withoutfastapi-cloud-cli, you can install insteadfastapi[standard-no-fastapi-cloud-cli].

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/advanced/response-directly.md. PR#13801 by@NavesSapnis.
  • 🌐 Add Russian translation fordocs/ru/docs/advanced/additional-status-codes.md. PR#13799 by@NavesSapnis.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/body-updates.md. PR#13804 by@valentinDruzhinin.

Internal

0.115.14

Fixes

Docs

  • ✏️ Fix grammar mistake indocs/en/docs/advanced/response-directly.md. PR#13800 by@NavesSapnis.
  • 📝 Update Speakeasy URL to Speakeasy Sandbox. PR#13697 by@ndimares.

Translations

  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/response-model.md. PR#13792 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/security/index.md. PR#13805 by@valentinDruzhinin.
  • ✏️ Fix typo indocs/ja/docs/tutorial/encoder.md. PR#13815 by@ruzia.
  • ✏️ Fix typo indocs/ja/docs/tutorial/handling-errors.md. PR#13814 by@ruzia.
  • ✏️ Fix typo indocs/ja/docs/tutorial/body-fields.md. PR#13802 by@ruzia.
  • 🌐 Add Russian translation fordocs/ru/docs/advanced/index.md. PR#13797 by@NavesSapnis.

Internal

0.115.13

Fixes

  • 🐛 Fix truncating the model's description with form feed (\f) character for Pydantic V2. PR#13698 by@YuriiMotov.

Refactors

Upgrades

Docs

Translations

Internal

0.115.12

Fixes

  • 🐛 Fixconvert_underscores=False for header Pydantic models. PR#13515 by@tiangolo.

Docs

Translations

  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/metadata.md page. PR#13459 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/response-status-code.md page. PR#13462 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/cookie-param-models.md page. PR#13460 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/header-param-models.md page. PR#13461 by@valentinDruzhinin.
  • 🌐 Add Japanese translation fordocs/ja/docs/virtual-environments.md. PR#13304 by@k94-ishi.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/security/oauth2-jwt.md. PR#13333 by@yes0ng.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/deployment/cloud.md. PR#13407 by@ptt3199.

Internal

0.115.11

Fixes

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/middleware.md. PR#13412 by@alv2017.

Internal

0.115.10

Fixes

  • ♻️ Update internal annotation usage for compatibility with Pydantic 2.11. PR#13314 by@Viicos.

Upgrades

Translations

0.115.9

Fixes

  • 🐛 Ensure thatHTTPDigest only raises an exception whenauto_error is True. PR#2939 by@arthurio.

Refactors

Docs

  • 🍱 Update sponsors: CodeRabbit logo. PR#13424 by@tiangolo.
  • 🩺 Unify the badges across all tutorial translations. PR#13329 by@svlandeg.
  • 📝 Fix typos in virtual environments documentation. PR#13396 by@bullet-ant.
  • 🐛 Fix issue with Swagger theme change example in the official tutorial. PR#13289 by@Zerohertz.
  • 📝 Add more precise description of HTTP status code range in docs. PR#13347 by@DanielYang59.
  • 🔥 Remove manual type annotations in JWT tutorial to avoid typing expectations (JWT doesn't provide more types). PR#13378 by@tiangolo.
  • 📝 Update docs for Query Params and String Validations, remove obsolete Ellipsis docs (...). PR#13377 by@tiangolo.
  • ✏️ Remove duplicate title in docsbody-multiple-params. PR#13345 by@DanielYang59.
  • 📝 Fix test badge. PR#13313 by@esadek.

Translations

  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/header-params.md. PR#13381 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/request-files.md. PR#13395 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/request-form-models.md. PR#13384 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/request-forms-and-files.md. PR#13386 by@valentinDruzhinin.
  • 🌐 Update Korean translation fordocs/ko/docs/help-fastapi.md. PR#13262 by@Zerohertz.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/custom-response.md. PR#13265 by@11kkw.
  • 🌐 Update Korean translation fordocs/ko/docs/tutorial/security/simple-oauth2.md. PR#13335 by@yes0ng.
  • 🌐 Add Russian translation fordocs/ru/docs/advanced/response-cookies.md. PR#13327 by@Stepakinoyan.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/tutorial/static-files.md. PR#11291 by@ptt3199.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/dependencies/dependencies-with-yield.md. PR#13257 by@11kkw.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/virtual-environments.md. PR#13282 by@ptt3199.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/static-files.md. PR#13285 by@valentinDruzhinin.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/environment-variables.md. PR#13287 by@ptt3199.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/fastapi-cli.md. PR#13294 by@ptt3199.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/features.md. PR#13308 by@valentinDruzhinin.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/learn/index.md. PR#13306 by@valentinDruzhinin.
  • 🌐 Update Portuguese Translation fordocs/pt/docs/deployment/https.md. PR#13317 by@Joao-Pedro-P-Holanda.
  • 🌐 Update Portuguese Translation fordocs/pt/docs/index.md. PR#13328 by@ceb10n.
  • 🌐 Add Russian translation fordocs/ru/docs/advanced/websockets.md. PR#13279 by@Rishat-F.

Internal

0.115.8

Fixes

  • 🐛 FixOAuth2PasswordRequestForm andOAuth2PasswordRequestFormStrict fixedgrant_type "password" RegEx. PR#9783 by@skarfie123.

Refactors

  • ✅ Simplify tests for body_multiple_params . PR#13237 by@alejsdev.
  • ♻️ Move duplicated code portion to a static method in theAPIKeyBase super class. PR#3142 by@ShahriyarR.
  • ✅ Simplify tests for request_files. PR#13182 by@alejsdev.

Docs

  • 📝 Change the word "unwrap" to "unpack" indocs/en/docs/tutorial/extra-models.md. PR#13061 by@timothy-jeong.
  • 📝 Update Request Body'stutorial002 to deal withtax=0 case. PR#13230 by@togogh.
  • 👥 Update FastAPI People - Experts. PR#13269 by@tiangolo.

Translations

  • 🌐 Add Japanese translation fordocs/ja/docs/environment-variables.md. PR#13226 by@k94-ishi.
  • 🌐 Add Russian translation fordocs/ru/docs/advanced/async-tests.md. PR#13227 by@Rishat-F.
  • 🌐 Update Russian translation fordocs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#13252 by@Rishat-F.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/bigger-applications.md. PR#13154 by@alv2017.

Internal

  • ⬆️ Add support for Python 3.13. PR#13274 by@tiangolo.
  • ⬆️ Upgrade AnyIO max version for tests, new range:>=3.2.1,<5.0.0. PR#13273 by@tiangolo.
  • 🔧 Update Sponsors badges. PR#13271 by@tiangolo.
  • ♻️ Fixnotify_translations.py empty env var handling for PR label events vs workflow_dispatch. PR#13272 by@tiangolo.
  • ♻️ Refactor and movescripts/notify_translations.py, no need for a custom GitHub Action. PR#13270 by@tiangolo.
  • 🔨 Update FastAPI People Experts script, refactor and optimize data fetching to handle rate limits. PR#13267 by@tiangolo.
  • ⬆ Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4. PR#13251 by@dependabot[bot].

0.115.7

Upgrades

Refactors

Docs

Translations

  • 🌐 Update Portuguese Translation fordocs/pt/docs/tutorial/request-forms.md. PR#13216 by@Joao-Pedro-P-Holanda.
  • 🌐 Update Portuguese translation fordocs/pt/docs/advanced/settings.md. PR#13209 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/security/oauth2-jwt.md. PR#13205 by@ceb10n.
  • 🌐 Add Indonesian translation fordocs/id/docs/index.md. PR#13191 by@gerry-sabar.
  • 🌐 Add Indonesian translation fordocs/id/docs/tutorial/static-files.md. PR#13092 by@guspan-tanadi.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/security/get-current-user.md. PR#13188 by@ceb10n.
  • 🌐 Remove Wrong Portuguese translations location fordocs/pt/docs/advanced/benchmarks.md. PR#13187 by@ceb10n.
  • 🌐 Update Portuguese translations. PR#13156 by@nillvitor.
  • 🌐 Update Russian translation fordocs/ru/docs/tutorial/security/first-steps.md. PR#13159 by@Yarous.
  • ✏️ Delete unnecessary backspace indocs/ja/docs/tutorial/path-params-numeric-validations.md. PR#12238 by@FakeDocument.
  • 🌐 Update Chinese translation fordocs/zh/docs/fastapi-cli.md. PR#13102 by@Zhongheng-Cheng.
  • 🌐 Add new Spanish translations for all docs with new LLM-assisted system using PydanticAI. PR#13122 by@tiangolo.
  • 🌐 Update existing Spanish translations using the new LLM-assisted system using PydanticAI. PR#13118 by@tiangolo.
  • 🌐 Update Chinese translation fordocs/zh/docs/advanced/security/oauth2-scopes.md. PR#13110 by@ChenPu2002.
  • 🌐 Add Indonesian translation fordocs/id/docs/tutorial/path-params.md. PR#13086 by@gerry-sabar.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/sql-databases.md. PR#13093 by@GeumBinLee.
  • 🌐 Update Chinese translation fordocs/zh/docs/async.md. PR#13095 by@Zhongheng-Cheng.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/openapi-webhooks.md. PR#13091 by@Zhongheng-Cheng.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/async-tests.md. PR#13074 by@Zhongheng-Cheng.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/fastapi-cli.md. PR#13020 by@ykertytsky.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/events.md. PR#12512 by@ZhibangYue.
  • 🌐 Add Russian translation for/docs/ru/docs/tutorial/sql-databases.md. PR#13079 by@alv2017.
  • 🌐 Update Chinese translation fordocs/zh/docs/advanced/testing-dependencies.md. PR#13066 by@Zhongheng-Cheng.
  • 🌐 Update Traditional Chinese translation fordocs/zh-hant/docs/tutorial/index.md. PR#13075 by@codingjenny.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/sql-databases.md. PR#13051 by@Zhongheng-Cheng.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/query-params-str-validations.md. PR#12928 by@Vincy1230.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/header-param-models.md. PR#13040 by@Zhongheng-Cheng.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/path-params.md. PR#12926 by@Vincy1230.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/first-steps.md. PR#12923 by@Vincy1230.
  • 🌐 Update Russian translation fordocs/ru/docs/deployment/docker.md. PR#13048 by@anklav24.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/generate-clients.md. PR#13030 by@vitumenezes.
  • 🌐 Add Indonesian translation fordocs/id/docs/tutorial/first-steps.md. PR#13042 by@gerry-sabar.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/cookie-param-models.md. PR#13038 by@Zhongheng-Cheng.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/request-form-models.md. PR#13045 by@Zhongheng-Cheng.
  • 🌐 Add Russian translation fordocs/ru/docs/virtual-environments.md. PR#13026 by@alv2017.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/testing.md. PR#12968 by@jts8257.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/async-test.md. PR#12918 by@icehongssii.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/security/oauth2-jwt.md. PR#10601 by@AlertRED.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/security/simple-oauth2.md. PR#10599 by@AlertRED.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/security/get-current-user.md. PR#10594 by@AlertRED.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/features.md. PR#12441 by@codingjenny.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/virtual-environments.md. PR#12791 by@Vincy1230.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/templates.md. PR#12726 by@Heumhub.
  • 🌐 Add Russian translation fordocs/ru/docs/fastapi-cli.md. PR#13041 by@alv2017.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/cookie-param-models.md. PR#13000 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/header-param-models.md. PR#13001 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/request-form-models.md. PR#13002 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/request-forms.md. PR#13003 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/resources/index.md. PR#13004 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/how-to/configure-swagger-ui.md. PR#12898 by@nahyunkeem.
  • 🌐 Add Korean translation todocs/ko/docs/advanced/additional-status-codes.md. PR#12715 by@nahyunkeem.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/tutorial/first-steps.md. PR#12467 by@codingjenny.

Internal

0.115.6

Fixes

  • 🐛 Preserve traceback when an exception is raised in sync dependency withyield. PR#5823 by@sombek.

Refactors

  • ♻️ Update tests and internals for compatibility with Pydantic >=2.10. PR#12971 by@tamird.

Docs

  • 📝 Update includes format in docs with an automated script. PR#12950 by@tiangolo.
  • 📝 Update includes fordocs/de/docs/advanced/using-request-directly.md. PR#12685 by@alissadb.
  • 📝 Update includes fordocs/de/docs/how-to/conditional-openapi.md. PR#12689 by@alissadb.

Translations

  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/async.md. PR#12990 by@ILoveSorasakiHina.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/tutorial/query-param-models.md. PR#12932 by@Vincy1230.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/testing-dependencies.md. PR#12992 by@Limsunoh.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/websockets.md. PR#12991 by@kwang1215.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/response-model.md. PR#12933 by@AndreBBM.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/middlewares.md. PR#12753 by@nahyunkeem.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/openapi-webhooks.md. PR#12752 by@saeye.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/query-param-models.md. PR#12931 by@Vincy1230.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/query-param-models.md. PR#12445 by@gitgernit.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/query-param-models.md. PR#12940 by@jts8257.
  • 🔥 Remove obsolete tutorial translation to Chinese fordocs/zh/docs/tutorial/sql-databases.md, it references files that are no longer on the repo. PR#12949 by@tiangolo.

Internal

0.115.5

Refactors

  • ♻️ Update internal checks to support Pydantic 2.10. PR#12914 by@tiangolo.

Docs

  • 📝 Update includes fordocs/en/docs/tutorial/body.md. PR#12757 by@gsheni.
  • 📝 Update includes indocs/en/docs/advanced/testing-dependencies.md. PR#12647 by@AyushSinghal1794.
  • 📝 Update includes fordocs/en/docs/tutorial/metadata.md. PR#12773 by@Nimitha-jagadeesha.
  • 📝 Updatedocs/en/docs/tutorial/dependencies/dependencies-with-yield.md. PR#12045 by@xuvjso.
  • 📝 Update includes fordocs/en/docs/tutorial/dependencies/global-dependencies.md. PR#12653 by@vishnuvskvkl.
  • 📝 Update includes fordocs/en/docs/tutorial/body-updates.md. PR#12712 by@davioc.
  • 📝 Remove mention of Celery in the project generators. PR#12742 by@david-caro.
  • 📝 Update includes indocs/en/docs/tutorial/header-param-models.md. PR#12814 by@zhaohan-dong.
  • 📝 Updatecontributing.md docs, include note to not translate this page. PR#12841 by@tiangolo.
  • 📝 Update includes indocs/en/docs/tutorial/request-forms.md. PR#12648 by@vishnuvskvkl.
  • 📝 Update includes indocs/en/docs/tutorial/request-form-models.md. PR#12649 by@vishnuvskvkl.
  • 📝 Update includes indocs/en/docs/tutorial/security/oauth2-jwt.md. PR#12650 by@OCE1960.
  • 📝 Update includes indocs/vi/docs/tutorial/first-steps.md. PR#12754 by@MxPy.
  • 📝 Update includes fordocs/pt/docs/advanced/wsgi.md. PR#12769 by@Nimitha-jagadeesha.
  • 📝 Update includes fordocs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#12815 by@handabaldeep.
  • 📝 Update includes fordocs/en/docs/tutorial/dependencies/classes-as-dependencies.md. PR#12813 by@handabaldeep.
  • ✏️ Fix error indocs/en/docs/tutorial/middleware.md. PR#12819 by@alejsdev.
  • 📝 Update includes fordocs/en/docs/tutorial/security/get-current-user.md. PR#12645 by@OCE1960.
  • 📝 Update includes fordocs/en/docs/tutorial/security/first-steps.md. PR#12643 by@OCE1960.
  • 📝 Update includes indocs/de/docs/advanced/additional-responses.md. PR#12821 by@zhaohan-dong.
  • 📝 Update includes indocs/en/docs/advanced/generate-clients.md. PR#12642 by@AyushSinghal1794.
  • 📝 Fix admonition double quotes with new syntax. PR#12835 by@tiangolo.
  • 📝 Update includes indocs/zh/docs/advanced/additional-responses.md. PR#12828 by@zhaohan-dong.
  • 📝 Update includes indocs/en/docs/tutorial/path-params-numeric-validations.md. PR#12825 by@zhaohan-dong.
  • 📝 Update includes fordocs/en/docs/advanced/testing-websockets.md. PR#12761 by@hamidrasti.
  • 📝 Update includes fordocs/en/docs/advanced/using-request-directly.md. PR#12760 by@hamidrasti.
  • 📝 Update includes fordocs/advanced/wsgi.md. PR#12758 by@hamidrasti.
  • 📝 Update includes indocs/de/docs/tutorial/middleware.md. PR#12729 by@paintdog.
  • 📝 Update includes fordocs/en/docs/tutorial/schema-extra-example.md. PR#12822 by@tiangolo.
  • 📝 Update includes indocs/fr/docs/advanced/additional-responses.md. PR#12634 by@fegmorte.
  • 📝 Update includes indocs/fr/docs/advanced/path-operation-advanced-configuration.md. PR#12633 by@kantandane.
  • 📝 Update includes indocs/fr/docs/advanced/response-directly.md. PR#12632 by@kantandane.
  • 📝 Update includes fordocs/en/docs/tutorial/header-params.md. PR#12640 by@vishnuvskvkl.
  • 📝 Update includes indocs/en/docs/tutorial/cookie-param-models.md. PR#12639 by@vishnuvskvkl.
  • 📝 Update includes fordocs/en/docs/tutorial/extra-models.md. PR#12638 by@vishnuvskvkl.
  • 📝 Update includes fordocs/en/docs/tutorial/cors.md. PR#12637 by@vishnuvskvkl.
  • 📝 Update includes fordocs/en/docs/tutorial/dependencies/sub-dependencies.md. PR#12810 by@handabaldeep.
  • 📝 Update includes indocs/en/docs/tutorial/body-nested-models.md. PR#12812 by@zhaohan-dong.
  • 📝 Update includes indocs/en/docs/tutorial/path-operation-configuration.md. PR#12809 by@AlexWendland.
  • 📝 Update includes indocs/en/docs/tutorial/request-files.md. PR#12818 by@zhaohan-dong.
  • 📝 Update includes fordocs/en/docs/tutorial/query-param-models.md. PR#12817 by@handabaldeep.
  • 📝 Update includes indocs/en/docs/tutorial/path-params.md. PR#12811 by@AlexWendland.
  • 📝 Update includes indocs/en/docs/tutorial/response-model.md. PR#12621 by@kantandane.
  • 📝 Update includes indocs/en/docs/advanced/websockets.md. PR#12606 by@vishnuvskvkl.
  • 📝 Updates include fordocs/en/docs/tutorial/cookie-params.md. PR#12808 by@handabaldeep.
  • 📝 Update includes indocs/en/docs/tutorial/middleware.md. PR#12807 by@AlexWendland.
  • 📝 Update includes indocs/en/docs/advanced/sub-applications.md. PR#12806 by@zhaohan-dong.
  • 📝 Update includes indocs/en/docs/advanced/response-headers.md. PR#12805 by@zhaohan-dong.
  • 📝 Update includes indocs/fr/docs/tutorial/first-steps.md. PR#12594 by@kantandane.
  • 📝 Update includes indocs/en/docs/advanced/response-cookies.md. PR#12804 by@zhaohan-dong.
  • 📝 Update includes indocs/en/docs/advanced/path-operation-advanced-configuration.md. PR#12802 by@zhaohan-dong.
  • 📝 Update includes fordocs/en/docs/advanced/response-directly.md. PR#12803 by@handabaldeep.
  • 📝 Update includes indocs/zh/docs/tutorial/background-tasks.md. PR#12798 by@zhaohan-dong.
  • 📝 Update includes fordocs/de/docs/tutorial/body-multiple-params.md. PR#12699 by@alissadb.
  • 📝 Update includes indocs/em/docs/tutorial/body-updates.md. PR#12799 by@AlexWendland.
  • 📝 Update includesdocs/en/docs/advanced/response-change-status-code.md. PR#12801 by@handabaldeep.
  • 📝 Update includesdocs/en/docs/advanced/openapi-callbacks.md. PR#12800 by@handabaldeep.
  • 📝 Update includes indocs/fr/docs/tutorial/body-multiple-params.md. PR#12598 by@kantandane.
  • 📝 Update includes indocs/en/docs/tutorial/body-multiple-params.md. PR#12593 by@Tashanam-Shahbaz.
  • 📝 Update includes indocs/pt/docs/tutorial/background-tasks.md. PR#12736 by@bhunao.
  • 📝 Update includes fordocs/en/docs/advanced/custom-response.md. PR#12797 by@handabaldeep.
  • 📝 Update includes fordocs/pt/docs/python-types.md. PR#12671 by@ceb10n.
  • 📝 Update includes fordocs/de/docs/python-types.md. PR#12660 by@alissadb.
  • 📝 Update includes fordocs/de/docs/advanced/dataclasses.md. PR#12658 by@alissadb.
  • 📝 Update includes indocs/fr/docs/tutorial/path-params.md. PR#12592 by@kantandane.
  • 📝 Update includes fordocs/de/docs/how-to/configure-swagger-ui.md. PR#12690 by@alissadb.
  • 📝 Update includes indocs/en/docs/advanced/security/oauth2-scopes.md. PR#12572 by@krishnamadhavan.
  • 📝 Update includes fordocs/en/docs/how-to/conditional-openapi.md. PR#12624 by@rabinlamadong.
  • 📝 Update includes indocs/en/docs/tutorial/dependencies/index.md. PR#12615 by@bharara.
  • 📝 Update includes indocs/en/docs/tutorial/response-status-code.md. PR#12620 by@kantandane.
  • 📝 Update includes indocs/en/docs/how-to/custom-docs-ui-assets.md. PR#12623 by@rabinlamadong.
  • 📝 Update includes indocs/en/docs/advanced/openapi-webhooks.md. PR#12605 by@salmantec.
  • 📝 Update includes indocs/en/docs/advanced/events.md. PR#12604 by@salmantec.
  • 📝 Update includes indocs/en/docs/advanced/dataclasses.md. PR#12603 by@salmantec.
  • 📝 Update includes indocs/es/docs/tutorial/cookie-params.md. PR#12602 by@antonyare93.
  • 📝 Update includes indocs/fr/docs/tutorial/path-params-numeric-validations.md. PR#12601 by@kantandane.
  • 📝 Update includes indocs/fr/docs/tutorial/background-tasks.md. PR#12600 by@kantandane.
  • 📝 Update includes indocs/en/docs/tutorial/encoder.md. PR#12597 by@tonyjly.
  • 📝 Update includes indocs/en/docs/how-to/custom-docs-ui-assets.md. PR#12557 by@philipokiokio.
  • 🎨 Adjust spacing. PR#12635 by@alejsdev.
  • 📝 Update includes indocs/en/docs/how-to/custom-request-and-route.md. PR#12560 by@philipokiokio.

Translations

  • 🌐 Add Korean translation fordocs/ko/docs/advanced/testing-websockets.md. PR#12739 by@Limsunoh.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/environment-variables.md. PR#12785 by@Vincy1230.
  • 🌐 Add Chinese translation fordocs/zh/docs/environment-variables.md. PR#12784 by@Vincy1230.
  • 🌐 Add Korean translation forko/docs/advanced/response-headers.md. PR#12740 by@kwang1215.
  • 🌐 Add Chinese translation fordocs/zh/docs/virtual-environments.md. PR#12790 by@Vincy1230.
  • 🌐 Add Korean translation for/docs/ko/docs/environment-variables.md. PR#12526 by@Tolerblanc.
  • 🌐 Add Korean translation fordocs/ko/docs/history-design-future.md. PR#12646 by@saeye.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/advanced-dependencies.md. PR#12675 by@kim-sangah.
  • 🌐 Add Korean translation fordocs/ko/docs/how-to/conditional-openapi.md. PR#12731 by@sptcnl.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/using_request_directly.md. PR#12738 by@kwang1215.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/testing-events.md. PR#12741 by@9zimin9.
  • 🌐 Add Korean translation fordocs/ko/docs/security/index.md. PR#12743 by@kim-sangah.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/path-operation-advanced-configuration.md. PR#12762 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/wsgi.md. PR#12659 by@Limsunoh.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/websockets.md. PR#12703 by@devfernandoa.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/security/simple-oauth2.md. PR#12520 by@LidiaDomingos.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/response-directly.md. PR#12674 by@9zimin9.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/middleware.md. PR#12704 by@devluisrodrigues.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/openapi-callbacks.md. PR#12705 by@devfernandoa.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/request-files.md. PR#12706 by@devluisrodrigues.
  • 🌐 Add Portuguese Translation fordocs/pt/docs/advanced/custom-response.md. PR#12631 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/metadata.md. PR#12538 by@LinkolnR.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/metadata.md. PR#12541 by@kwang1215.
  • 🌐 Add Korean Translation fordocs/ko/docs/advanced/response-cookies.md. PR#12546 by@kim-sangah.
  • 🌐 Add Korean translation fordocs/ko/docs/fastapi-cli.md. PR#12515 by@dhdld.
  • 🌐 Add Korean Translation fordocs/ko/docs/advanced/response-change-status-code.md. PR#12547 by@9zimin9.

Internal

0.115.4

Refactors

  • ♻️ Update logic to import and checkpython-multipart for compatibility with newer version. PR#12627 by@tiangolo.

Docs

Translations

  • 📝 Update includes indocs/de/docs/advanced/async-tests.md. PR#12567 by@imjuanleonard.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/sql-databases.md. PR#12530 by@ilacftemp.
  • 🌐 Add Korean translation fordocs/ko/docs/benchmarks.md. PR#12540 by@Limsunoh.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/separate-openapi-schemas.md. PR#12518 by@ilacftemp.
  • 🌐 Update Traditional Chinese translation fordocs/zh-hant/docs/deployment/index.md. PR#12521 by@codingjenny.
  • 🌐 Update Traditional Chinese translation fordocs/zh-hant/docs/deployment/cloud.md. PR#12522 by@codingjenny.
  • 🌐 Update Traditional Chinese translation fordocs/zh-hant/docs/how-to/index.md. PR#12523 by@codingjenny.
  • 🌐 Update Traditional Chinese translation fordocs/zh-hant/docs/tutorial/index.md. PR#12524 by@codingjenny.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/how-to/index.md. PR#12468 by@codingjenny.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/tutorial/index.md. PR#12466 by@codingjenny.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/header-param-models.md. PR#12437 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/extending-openapi.md. PR#12470 by@ilacftemp.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/dataclasses.md. PR#12475 by@leoscarlato.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/custom-request-and-route.md. PR#12483 by@devfernandoa.

Internal

0.115.3

Upgrades

Docs

Translations

  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/fastapi-cli.md. PR#12444 by@codingjenny.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/deployment/index.md. PR#12439 by@codingjenny.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/testing-database.md. PR#12472 by@GuilhermeRameh.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/custom-docs-ui-assets.md. PR#12473 by@devluisrodrigues.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/response-headers.md. PR#12458 by@leonardopaloschi.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/deployment/cloud.md. PR#12440 by@codingjenny.
  • 🌐 Update Portuguese translation fordocs/pt/docs/python-types.md. PR#12428 by@ceb10n.
  • 🌐 Add Russian translation fordocs/ru/docs/environment-variables.md. PR#12436 by@wisderfin.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/resources/index.md. PR#12443 by@codingjenny.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/about/index.md. PR#12438 by@codingjenny.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/query-param-models.md. PR#12414 by@ceb10n.
  • 🌐 Remove Portuguese translation fordocs/pt/docs/deployment.md. PR#12427 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/body-updates.md. PR#12381 by@andersonrocha0.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/response-cookies.md. PR#12417 by@Paulofalcao2002.

Internal

0.115.2

Upgrades

0.115.1

Fixes

  • 🐛 Fix openapi generation with responses kwarg. PR#10895 by@flxdot.
  • 🐛 RemoveRequired shadowing from fastapi using Pydantic v2. PR#12197 by@pachewise.

Refactors

  • ♻️ Update type annotations for improvedpython-multipart. PR#12407 by@tiangolo.

Docs

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/cookie-param-models.md. PR#12298 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/graphql.md. PR#12215 by@AnandaCampelo.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/security/oauth2-scopes.md. PR#12263 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/deployment/concepts.md. PR#12219 by@marcelomarkus.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/conditional-openapi.md. PR#12221 by@marcelomarkus.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/response-directly.md. PR#12266 by@Joao-Pedro-P-Holanda.
  • 🌐 Update Portuguese translation fordocs/pt/docs/tutorial/cookie-params.md. PR#12297 by@ceb10n.
  • 🌐 Fix Korean translation fordocs/ko/docs/tutorial/index.md. PR#12278 by@kkotipy.
  • 🌐 Update Portuguese translation fordocs/pt/docs/advanced/security/http-basic-auth.md. PR#12275 by@andersonrocha0.
  • 🌐 Add Portuguese translation fordocs/pt/docs/deployment/cloud.md. PR#12217 by@marcelomarkus.
  • ✏️ Fix typo indocs/es/docs/python-types.md. PR#12235 by@JavierSanchezCastro.
  • 🌐 Add Dutch translation fordocs/nl/docs/environment-variables.md. PR#12200 by@maxscheijen.
  • 🌐 Add Portuguese translation fordocs/pt/docs/deployment/manually.md. PR#12210 by@JoaoGustavoRogel.
  • 🌐 Add Portuguese translation fordocs/pt/docs/deployment/server-workers.md. PR#12220 by@marcelomarkus.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/configure-swagger-ui.md. PR#12222 by@marcelomarkus.

Internal

0.115.0

Highlights

Now you can declareQuery,Header, andCookie parameters with Pydantic models. 🎉

Query Parameter Models

Use Pydantic models forQuery parameters:

fromtypingimportAnnotated,LiteralfromfastapiimportFastAPI,QueryfrompydanticimportBaseModel,Fieldapp=FastAPI()classFilterParams(BaseModel):limit:int=Field(100,gt=0,le=100)offset:int=Field(0,ge=0)order_by:Literal["created_at","updated_at"]="created_at"tags:list[str]=[]@app.get("/items/")asyncdefread_items(filter_query:Annotated[FilterParams,Query()]):returnfilter_query

Read the new docs:Query Parameter Models.

Header Parameter Models

Use Pydantic models forHeader parameters:

fromtypingimportAnnotatedfromfastapiimportFastAPI,HeaderfrompydanticimportBaseModelapp=FastAPI()classCommonHeaders(BaseModel):host:strsave_data:boolif_modified_since:str|None=Nonetraceparent:str|None=Nonex_tag:list[str]=[]@app.get("/items/")asyncdefread_items(headers:Annotated[CommonHeaders,Header()]):returnheaders

Read the new docs:Header Parameter Models.

Cookie Parameter Models

Use Pydantic models forCookie parameters:

fromtypingimportAnnotatedfromfastapiimportCookie,FastAPIfrompydanticimportBaseModelapp=FastAPI()classCookies(BaseModel):session_id:strfatebook_tracker:str|None=Nonegoogall_tracker:str|None=None@app.get("/items/")asyncdefread_items(cookies:Annotated[Cookies,Cookie()]):returncookies

Read the new docs:Cookie Parameter Models.

Forbid Extra Query (Cookie, Header) Parameters

Use Pydantic models to restrict extra values forQuery parameters (also applies toHeader andCookie parameters).

To achieve it, use Pydantic'smodel_config = {"extra": "forbid"}:

fromtypingimportAnnotated,LiteralfromfastapiimportFastAPI,QueryfrompydanticimportBaseModel,Fieldapp=FastAPI()classFilterParams(BaseModel):model_config={"extra":"forbid"}limit:int=Field(100,gt=0,le=100)offset:int=Field(0,ge=0)order_by:Literal["created_at","updated_at"]="created_at"tags:list[str]=[]@app.get("/items/")asyncdefread_items(filter_query:Annotated[FilterParams,Query()]):returnfilter_query

This applies toQuery,Header, andCookie parameters, read the new docs:

Features

  • ✨ Add support for Pydantic models for parameters usingQuery,Cookie,Header. PR#12199 by@tiangolo.

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/security/http-basic-auth.md. PR#12195 by@ceb10n.

Internal

0.114.2

Fixes

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/request-form-models.md. PR#12175 by@ceb10n.
  • 🌐 Add Chinese translation fordocs/zh/docs/project-generation.md. PR#12170 by@waketzheng.
  • 🌐 Add Dutch translation fordocs/nl/docs/python-types.md. PR#12158 by@maxscheijen.

Internal

0.114.1

Refactors

  • ⚡️ Improve performance in request body parsing with a cache for internal model fields. PR#12184 by@tiangolo.

Docs

  • 📝 Remove duplicate line in docs fordocs/en/docs/environment-variables.md. PR#12169 by@prometek.

Translations

Internal

0.114.0

You can restrict form fields to only include those declared in a Pydantic model and forbid any extra field sent in the request using Pydantic'smodel_config = {"extra": "forbid"}:

fromtypingimportAnnotatedfromfastapiimportFastAPI,FormfrompydanticimportBaseModelapp=FastAPI()classFormData(BaseModel):username:strpassword:strmodel_config={"extra":"forbid"}@app.post("/login/")asyncdeflogin(data:Annotated[FormData,Form()]):returndata

Read the new docs:Form Models - Forbid Extra Form Fields.

Features

  • ✨ Add support for forbidding extra form fields with Pydantic models. PR#12134 by@tiangolo.

Docs

  • 📝 Update docs, Form Models section title, to match config name. PR#12152 by@tiangolo.

Internal

  • ✅ Update internal tests for latest Pydantic, including CI tweaks to install the latest Pydantic. PR#12147 by@tiangolo.

0.113.0

Now you can declare form fields with Pydantic models:

fromtypingimportAnnotatedfromfastapiimportFastAPI,FormfrompydanticimportBaseModelapp=FastAPI()classFormData(BaseModel):username:strpassword:str@app.post("/login/")asyncdeflogin(data:Annotated[FormData,Form()]):returndata

Read the new docs:Form Models.

Features

  • ✨ Add support for Pydantic models inForm parameters. PR#12129 by@tiangolo.

Internal

0.112.4

This release is mainly a big internal refactor to enable adding support for Pydantic models forForm fields, but that feature comes in the next release.

This release shouldn't affect apps using FastAPI in any way. You don't even have to upgrade to this version yet. It's just a checkpoint. 🤓

Refactors

  • ♻️ Refactor deciding ifembed body fields, do not overwrite fields, compute once per router, refactor internals in preparation for Pydantic models inForm,Query and others. PR#12117 by@tiangolo.

Internal

  • ⏪️ Temporarily revert "✨ Add support for Pydantic models inForm parameters" to make a checkpoint release. PR#12128 by@tiangolo. Restored by PR#12129.
  • ✨ Add support for Pydantic models inForm parameters. PR#12127 by@tiangolo. Reverted by PR#12128 to make a checkpoint release with only refactors. Restored by PR#12129.

0.112.3

This release is mainly internal refactors, it shouldn't affect apps using FastAPI in any way. You don't even have to upgrade to this version yet. There are a few bigger releases coming right after. 🚀

Refactors

  • ♻️ Refactor internalcheck_file_field(), rename toensure_multipart_is_installed() to clarify its purpose. PR#12106 by@tiangolo.
  • ♻️ Rename internalcreate_response_field() tocreate_model_field() as it's used for more than response models. PR#12103 by@tiangolo.
  • ♻️ Refactor and simplify internal data fromsolve_dependencies() using dataclasses. PR#12100 by@tiangolo.
  • ♻️ Refactor and simplify internalanalyze_param() to structure data with dataclasses instead of tuple. PR#12099 by@tiangolo.
  • ♻️ Refactor and simplify dependencies data structures with dataclasses. PR#12098 by@tiangolo.

Docs

  • 📝 Add External Link: Techniques and applications of SQLAlchemy global filters in FastAPI. PR#12109 by@TheShubhendra.
  • 📝 Add note abouttime.perf_counter() in middlewares. PR#12095 by@tiangolo.
  • 📝 Tweak middleware code sampletime.time() totime.perf_counter(). PR#11957 by@domdent.
  • 🔧 Update sponsors: Coherence. PR#12093 by@tiangolo.
  • 📝 Fix async test example not to trigger DeprecationWarning. PR#12084 by@marcinsulikowski.
  • 📝 Updatedocs_src/path_params_numeric_validations/tutorial006.py. PR#11478 by@MuhammadAshiqAmeer.
  • 📝 Update comma indocs/en/docs/async.md. PR#12062 by@Alec-Gillis.
  • 📝 Update docs about serving FastAPI: ASGI servers, Docker containers, etc.. PR#12069 by@tiangolo.
  • 📝 Clarifyresponse_class parameter, validations, and returning a response directly. PR#12067 by@tiangolo.
  • 📝 Fix minor typos and issues in the documentation. PR#12063 by@svlandeg.
  • 📝 Add note in Docker docs about ensuring graceful shutdowns and lifespan events withCMD exec form. PR#11960 by@GPla.

Translations

  • 🌐 Add Dutch translation fordocs/nl/docs/features.md. PR#12101 by@maxscheijen.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/testing-events.md. PR#12108 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/security/index.md. PR#12114 by@ceb10n.
  • 🌐 Add Dutch translation fordocs/nl/docs/index.md. PR#12042 by@svlandeg.
  • 🌐 Update Chinese translation fordocs/zh/docs/how-to/index.md. PR#12070 by@synthpop123.

Internal

0.112.2

Fixes

  • 🐛 Fixallow_inf_nan option for Param and Body classes. PR#11867 by@giunio-prc.
  • 🐛 Ensure thatapp.include_router merges nested lifespans. PR#9630 by@Lancetnik.

Refactors

Docs

  • 📝 Fix a typo indocs/en/docs/virtual-environments.md. PR#12064 by@aymenkrifa.
  • 📝 Add docs about Environment Variables and Virtual Environments. PR#12054 by@tiangolo.
  • 📝 Add Asyncer mention in async docs. PR#12037 by@tiangolo.
  • 📝 Move the Features docs to the top level to improve the main page menu. PR#12036 by@tiangolo.
  • ✏️ Fix import typo in reference example forSecurity. PR#11168 by@0shah0.
  • 📝 Highlight correct line in tutorialdocs/en/docs/tutorial/body-multiple-params.md. PR#11978 by@svlandeg.
  • 🔥 Remove Sentry link from Advanced Middleware docs. PR#12031 by@alejsdev.
  • 📝 Clarify management tasks for translations, multiples files in one PR. PR#12030 by@tiangolo.
  • 📝 Edit the link to the OpenAPI "Responses Object" and "Response Object" sections in the "Additional Responses in OpenAPI" section. PR#11996 by@VaitoSoi.
  • 🔨 Specifyemail-validator dependency with dash. PR#11515 by@jirikuncar.
  • 🌐 Add Spanish translation fordocs/es/docs/project-generation.md. PR#11947 by@alejsdev.
  • 📝 Fix minor typo. PR#12026 by@MicaelJarniac.
  • 📝 Several docs improvements, tweaks, and clarifications. PR#11390 by@nilslindemann.
  • 📝 Add missingcompresslevel parameter on docs forGZipMiddleware. PR#11350 by@junah201.
  • 📝 Fix inconsistent response code when item already exists in docs for testing. PR#11818 by@lokomilo.
  • 📝 Updatedocs/en/docs/tutorial/body.md with Python 3.10 union type example. PR#11415 by@rangzen.

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/request_file.md. PR#12018 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Japanese translation fordocs/ja/docs/learn/index.md. PR#11592 by@ukwhatn.
  • 📝 Update Spanish translation docs for consistency. PR#12044 by@alejsdev.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/dependencies/dependencies-with-yield.md. PR#12028 by@xuvjso.
  • 📝 Update FastAPI People, do not translate to have the most recent info. PR#12034 by@tiangolo.
  • 🌐 Update Urdu translation fordocs/ur/docs/benchmarks.md. PR#10046 by@AhsanSheraz.

Internal

0.112.1

Upgrades

Docs

  • 📝 Update docs section about "Don't Translate these Pages". PR#12022 by@tiangolo.
  • 📝 Add documentation for non-translated pages and scripts to verify them. PR#12020 by@tiangolo.
  • 📝 Update docs about discussions questions. PR#11985 by@tiangolo.

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/bigger-applications.md. PR#11971 by@marcelomarkus.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/testing-websockets.md. PR#11994 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/testing-dependencies.md. PR#11995 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/using-request-directly.md. PR#11956 by@ceb10n.
  • 🌐 Add French translation fordocs/fr/docs/tutorial/body-multiple-params.md. PR#11796 by@pe-brian.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/query-params.md. PR#11557 by@caomingpei.
  • 🌐 Update typo in Chinese translation fordocs/zh/docs/advanced/testing-dependencies.md. PR#11944 by@bestony.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/sub-applications.md anddocs/pt/docs/advanced/behind-a-proxy.md. PR#11856 by@marcelomarkus.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/cors.md anddocs/pt/docs/tutorial/middleware.md. PR#11916 by@wesinalves.
  • 🌐 Add French translation fordocs/fr/docs/tutorial/path-params-numeric-validations.md. PR#11788 by@pe-brian.

Internal

0.112.0

Breaking Changes

  • ♻️ Add support forpip install "fastapi[standard]" with standard dependencies andpython -m fastapi. PR#11935 by@tiangolo.

Summary

Install with:

pipinstall"fastapi[standard]"

Other Changes

  • This adds support for calling the CLI as:
python-mfastapi
  • And it upgradesfastapi-cli[standard] >=0.0.5.

Technical Details

Before this,fastapi would include the standard dependencies, with Uvicorn and thefastapi-cli, etc.

Andfastapi-slim would not include those standard dependencies.

Nowfastapi doesn't include those standard dependencies unless you install withpip install "fastapi[standard]".

Before, you would installpip install fastapi, now you should include thestandard optional dependencies (unless you want to exclude one of those):pip install "fastapi[standard]".

This change is because having the standard optional dependencies installed by default was being inconvenient to several users, and having to install insteadfastapi-slim was not being a feasible solution.

Discussed here:#11522 and here:#11525

Docs

Translations

  • 🌐 Update Portuguese translation fordocs/pt/docs/alternatives.md. PR#11931 by@ceb10n.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/dependencies/sub-dependencies.md. PR#10515 by@AlertRED.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/response-change-status-code.md. PR#11863 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/reference/background.md. PR#11849 by@lucasbalieiro.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/dependencies/dependencies-with-yield.md. PR#11848 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Portuguese translation fordocs/pt/docs/reference/apirouter.md. PR#11843 by@lucasbalieiro.

Internal

0.111.1

Upgrades

  • ➖ Removeorjson andujson from default dependencies. PR#11842 by@tiangolo.
    • These dependencies are still installed when you install withpip install "fastapi[all]". But they are not included inpip install fastapi.
  • 📝 Restored Swagger-UI links to use the latest version possible. PR#11459 by@UltimateLobster.

Docs

Translations

  • 🌐 Add Spanish translation fordocs/es/docs/how-to/graphql.md. PR#11697 by@camigomezdev.
  • 🌐 Add Portuguese translation fordocs/pt/docs/reference/index.md. PR#11840 by@lucasbalieiro.
  • 🌐 Fix link in German translation. PR#11836 by@anitahammer.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/dependencies/sub-dependencies.md. PR#11792 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Turkish translation fordocs/tr/docs/tutorial/request-forms.md. PR#11553 by@hasansezertasan.
  • 🌐 Add Portuguese translation fordocs/pt/docs/reference/exceptions.md. PR#11834 by@lucasbalieiro.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/dependencies/global-dependencies.md. PR#11826 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/general.md. PR#11825 by@lucasbalieiro.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/async-tests.md. PR#11808 by@ceb10n.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/first-steps.md. PR#11809 by@vkhoroshchak.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/dependencies/dependencies-in-path-operation-operators.md. PR#11804 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Chinese translation fordocs/zh/docs/fastapi-cli.md. PR#11786 by@logan2d5.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/openapi-webhooks.md. PR#11791 by@ceb10n.
  • 🌐 Update Chinese translation fordocs/tutorial/security/oauth2-jwt.md. PR#11781 by@logan2d5.
  • 📝 Fix image missing in French translation fordocs/fr/docs/async.md . PR#11787 by@pe-brian.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/advanced-dependencies.md. PR#11775 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/dependencies/classes-as-dependencies.md. PR#11768 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/additional-status-codes.md. PR#11753 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/dependencies/index.md. PR#11757 by@Joao-Pedro-P-Holanda.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/settings.md. PR#11739 by@Joao-Pedro-P-Holanda.
  • 🌐 Add French translation fordocs/fr/docs/learn/index.md. PR#11712 by@benjaminvandammeholberton.
  • 🌐 Add Portuguese translation fordocs/pt/docs/how-to/index.md. PR#11731 by@vhsenna.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/additional-responses.md. PR#11736 by@ceb10n.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/benchmarks.md. PR#11713 by@ceb10n.
  • 🌐 Fix Korean translation fordocs/ko/docs/tutorial/response-status-code.md. PR#11718 by@nayeonkinn.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/extra-data-types.md. PR#11711 by@nayeonkinn.
  • 🌐 Fix Korean translation fordocs/ko/docs/tutorial/body-nested-models.md. PR#11710 by@nayeonkinn.
  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/fastapi-cli.md. PR#11641 by@ayr-ton.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/fastapi-people.md. PR#11639 by@hsuanchi.
  • 🌐 Add Turkish translation fordocs/tr/docs/advanced/index.md. PR#11606 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/deployment/cloud.md. PR#11610 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/advanced/security/index.md. PR#11609 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/advanced/testing-websockets.md. PR#11608 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/how-to/general.md. PR#11607 by@hasansezertasan.
  • 🌐 Update Chinese translation fordocs/zh/docs/advanced/templates.md. PR#11620 by@chaoless.
  • 🌐 Add Turkish translation fordocs/tr/docs/deployment/index.md. PR#11605 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/tutorial/static-files.md. PR#11599 by@hasansezertasan.
  • 🌐 Polish translation fordocs/pl/docs/fastapi-people.md. PR#10196 by@isulim.
  • 🌐 Add Turkish translation fordocs/tr/docs/advanced/wsgi.md. PR#11575 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/tutorial/cookie-params.md. PR#11561 by@hasansezertasan.
  • 🌐 Add Russian translation fordocs/ru/docs/about/index.md. PR#10961 by@s111d.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/sql-databases.md. PR#11539 by@chaoless.
  • 🌐 Add Chinese translation fordocs/zh/docs/how-to/configure-swagger-ui.md. PR#11501 by@Lucas-lyh.
  • 🌐 Update Chinese translation for/docs/advanced/security/http-basic-auth.md. PR#11512 by@nick-cjyx9.

Internal

0.111.0

Features

Try it out with:

$pipinstall--upgradefastapi$fastapidevmain.py ╭────────── FastAPI CLI - Development mode ───────────╮ │                                                     │ │  Serving at: http://127.0.0.1:8000                  │ │                                                     │ │  API docs: http://127.0.0.1:8000/docs               │ │                                                     │ │  Running in development mode, for production use:   │ │                                                     │ │  fastapi run                                        │ │                                                     │ ╰─────────────────────────────────────────────────────╯INFO:     Will watch for changes in these directories: ['/home/user/code/awesomeapp']INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)INFO:     Started reloader process [2248755] using WatchFilesINFO:     Started server process [2248757]INFO:     Waiting for application startup.INFO:     Application startup complete.

Refactors

  • 🔧 Add configs and setup forfastapi-slim including optional extrasfastapi-slim[standard], andfastapi including by default the samestandard extras. PR#11503 by@tiangolo.

0.110.3

Docs

  • 📝 Update references to Python version, FastAPI supports all the current versions, no need to make the version explicit. PR#11496 by@tiangolo.
  • ✏️ Fix typo infastapi/security/api_key.py. PR#11481 by@ch33zer.
  • ✏️ Fix typo insecurity/http.py. PR#11455 by@omarmoo5.

Translations

  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/benchmarks.md. PR#11484 by@KNChiu.
  • 🌐 Update Chinese translation fordocs/zh/docs/fastapi-people.md. PR#11476 by@billzhong.
  • 🌐 Add Chinese translation fordocs/zh/docs/how-to/index.md anddocs/zh/docs/how-to/general.md. PR#11443 by@billzhong.
  • 🌐 Add Spanish translation for cookie-paramsdocs/es/docs/tutorial/cookie-params.md. PR#11410 by@fabianfalon.

Internal

0.110.2

Fixes

  • 🐛 Fix support for query parameters with list types, handle JSON encoding PydanticUndefinedType. PR#9929 by@arjwilliams.

Refactors

  • ♻️ Simplify Pydantic configs in OpenAPI models infastapi/openapi/models.py. PR#10886 by@JoeTanto2.
  • ✨ Add support for Pydantic's 2.7 new deprecated Field parameter, remove URL from validation errors response. PR#11461 by@tiangolo.

Docs

Translations

  • 🌐 Update Chinese translation fordocs/zh/docs/index.html. PR#11430 by@waketzheng.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#11411 by@anton2yakovlev.
  • 🌐 Add Portuguese translations forlearn/index.mdresources/index.mdhelp/index.mdabout/index.md. PR#10807 by@nazarepiedady.
  • 🌐 Update Russian translations for deployments docs. PR#11271 by@Lufa1u.
  • 🌐 Add Bengali translations fordocs/bn/docs/python-types.md. PR#11376 by@imtiaz101325.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/security/simple-oauth2.md. PR#5744 by@KdHyeon0661.
  • 🌐 Add Korean translation fordocs/ko/docs/help-fastapi.md. PR#4139 by@kty4119.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/events.md. PR#5087 by@pers0n4.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/path-operation-configuration.md. PR#1954 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/request-forms-and-files.md. PR#1946 by@SwftAlpc.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/dependencies/dependencies-with-yield.md. PR#10532 by@AlertRED.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/debugging.md. PR#5695 by@JungWooGeon.

Internal

0.110.1

Fixes

  • 🐛 Fix parameterlessDepends() with generics. PR#9479 by@nzig.

Refactors

  • ♻️ Update mypy. PR#11049 by@k0t3n.
  • ♻️ Simplify string format with f-strings infastapi/applications.py. PR#11335 by@igeni.

Upgrades

  • ⬆️ Upgrade Starlette to >=0.37.2,<0.38.0, remove Starlette filterwarning for internal tests. PR#11266 by@nothielf.

Docs

  • 📝 Tweak docs and translations links and remove old docs translations. PR#11381 by@tiangolo.
  • ✏️ Fix typo infastapi/security/oauth2.py. PR#11368 by@shandongbinzhou.
  • 📝 Update links to Pydantic docs to point to new website. PR#11328 by@alejsdev.
  • ✏️ Fix typo indocs/en/docs/tutorial/extra-models.md. PR#11329 by@alejsdev.
  • 📝 Updateproject-generation.md. PR#11326 by@alejsdev.
  • 📝 Update External Links. PR#11327 by@alejsdev.
  • 🔥 Remove link to Pydantic's benchmark, on other i18n pages.. PR#11224 by@hirotoKirimaru.
  • ✏️ Fix typos in docstrings. PR#11295 by@davidhuser.
  • 🛠️ Improve Node.js script in docs to generate TypeScript clients. PR#11293 by@alejsdev.
  • 📝 Update examples for tests to replace "inexistent" for "nonexistent". PR#11220 by@Homesteady.
  • 📝 Updatepython-multipart GitHub link in all docs fromhttps://andrew-d.github.io/python-multipart/ tohttps://github.com/Kludex/python-multipart. PR#11239 by@joshjhans.

Translations

  • 🌐 Add German translation fordocs/de/docs/tutorial/response-status-code.md. PR#10357 by@nilslindemann.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/query-params.md. PR#3480 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/body.md. PR#3481 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/path-params.md. PR#3479 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/tutorial/body-fields.md. PR#3496 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/tutorial/extra-models.md. PR#3497 by@jaystone776.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/metadata.md. PR#2667 by@tokusumi.
  • 🌐 Add German translation fordocs/de/docs/contributing.md. PR#10487 by@nilslindemann.
  • 🌐 Update Japanese translation ofdocs/ja/docs/tutorial/query-params.md. PR#10808 by@urushio.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/security/get-current-user.md. PR#3842 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/openapi-callbacks.md. PR#3825 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/extending-openapi.md. PR#3823 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/testing-dependencies.md. PR#3819 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/custom-request-and-route.md. PR#3816 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/external-links.md. PR#3833 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/templates.md. PR#3812 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/sub-applications.md. PR#3811 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/async-sql-databases.md. PR#3805 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/middleware.md. PR#3804 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/dataclasses.md. PR#3803 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/using-request-directly.md. PR#3802 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/security/http-basic-auth.md. PR#3801 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/security/oauth2-scopes.md. PR#3800 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/cookie-params.md. PR#3486 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/header-params.md. PR#3487 by@jaystone776.
  • 🌐 Update Chinese translation fordocs/tutorial/response-status-code.md. PR#3498 by@jaystone776.
  • 🌐 Add German translation fordocs/de/docs/tutorial/security/first-steps.md. PR#10432 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/events.md. PR#10693 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/cloud.md. PR#10746 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/behind-a-proxy.md. PR#10675 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/help-fastapi.md. PR#10455 by@nilslindemann.
  • 🌐 Update German translation fordocs/de/docs/python-types.md. PR#10287 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/path-params.md. PR#10290 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/handling-errors.md. PR#10379 by@nilslindemann.
  • 🌐 Update German translation fordocs/de/docs/index.md. PR#10283 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/security/http-basic-auth.md. PR#10651 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/bigger-applications.md. PR#10554 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/path-operation-advanced-configuration.md. PR#10612 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/static-files.md. PR#10584 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/security/oauth2-jwt.md. PR#10522 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/response-model.md. PR#10345 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/extra-models.md. PR#10351 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/body-updates.md. PR#10396 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/alternatives.md. PR#10855 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/templates.md. PR#10678 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/security/oauth2-scopes.md. PR#10643 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/async-tests.md. PR#10708 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/metadata.md. PR#10581 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/testing.md. PR#10586 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/schema-extra-example.md. PR#10597 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/index.md. PR#10611 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/response-directly.md. PR#10618 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/additional-responses.md. PR#10626 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/response-cookies.md. PR#10627 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/response-headers.md. PR#10628 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/response-change-status-code.md. PR#10632 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/advanced-dependencies.md. PR#10633 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/security/index.md. PR#10635 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/using-request-directly.md. PR#10653 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/dataclasses.md. PR#10667 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/middleware.md. PR#10668 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/sub-applications.md. PR#10671 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/websockets.md. PR#10687 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/testing-websockets.md. PR#10703 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/testing-events.md. PR#10704 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/testing-dependencies.md. PR#10706 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/openapi-callbacks.md. PR#10710 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/settings.md. PR#10709 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/wsgi.md. PR#10713 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/index.md. PR#10733 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/https.md. PR#10737 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/manually.md. PR#10738 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/concepts.md. PR#10744 by@nilslindemann.
  • 🌐 Update German translation fordocs/de/docs/features.md. PR#10284 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/server-workers.md. PR#10747 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/docker.md. PR#10759 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/index.md. PR#10769 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/general.md. PR#10770 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/graphql.md. PR#10788 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/custom-request-and-route.md. PR#10789 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/conditional-openapi.md. PR#10790 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/separate-openapi-schemas.md. PR#10796 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/configure-swagger-ui.md. PR#10804 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/how-to/custom-docs-ui-assets.md. PR#10803 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/parameters.md. PR#10814 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/status.md. PR#10815 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/uploadfile.md. PR#10816 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/exceptions.md. PR#10817 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/dependencies.md. PR#10818 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/apirouter.md. PR#10819 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/websockets.md. PR#10822 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/httpconnection.md. PR#10823 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/response.md. PR#10824 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/middleware.md. PR#10837 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/openapi/*.md. PR#10838 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/security/index.md. PR#10839 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/staticfiles.md. PR#10841 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/testclient.md. PR#10843 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/project-generation.md. PR#10851 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/history-design-future.md. PR#10865 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/dependencies/dependencies-with-yield.md. PR#10422 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/dependencies/global-dependencies.md. PR#10420 by@nilslindemann.
  • 🌐 Update German translation fordocs/de/docs/fastapi-people.md. PR#10285 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/dependencies/sub-dependencies.md. PR#10409 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/security/index.md. PR#10429 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#10411 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/extra-data-types.md. PR#10534 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/security/simple-oauth2.md. PR#10504 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/security/get-current-user.md. PR#10439 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/request-forms-and-files.md. PR#10368 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/encoder.md. PR#10385 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/request-forms.md. PR#10361 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/deployment/versions.md. PR#10491 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/async.md. PR#10449 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/cookie-params.md. PR#10323 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/dependencies/classes-as-dependencies.md. PR#10407 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/dependencies/index.md. PR#10399 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/header-params.md. PR#10326 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/path-params-numeric-validations.md. PR#10307 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/query-params-str-validations.md. PR#10304 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/request-files.md. PR#10364 by@nilslindemann.
  • :globe_with_meridians: Add Portuguese translation fordocs/pt/docs/advanced/templates.md. PR#11338 by@SamuelBFavarin.
  • 🌐 Add Bengali translations fordocs/bn/docs/learn/index.md. PR#11337 by@imtiaz101325.
  • 🌐 Fix Korean translation fordocs/ko/docs/index.md. PR#11296 by@choi-haram.
  • 🌐 Add Korean translation fordocs/ko/docs/about/index.md. PR#11299 by@choi-haram.
  • 🌐 Add Korean translation fordocs/ko/docs/advanced/index.md. PR#9613 by@ElliottLarsen.
  • 🌐 Add German translation fordocs/de/docs/how-to/extending-openapi.md. PR#10794 by@nilslindemann.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/metadata.md. PR#11286 by@jackleeio.
  • 🌐 Update Chinese translation fordocs/zh/docs/contributing.md. PR#10887 by@Aruelius.
  • 🌐 Add Azerbaijani translation fordocs/az/docs/fastapi-people.md. PR#11195 by@vusallyv.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/dependencies/index.md. PR#11223 by@kohiry.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/query-params.md. PR#11242 by@jackleeio.
  • 🌐 Add Azerbaijani translation fordocs/az/learn/index.md. PR#11192 by@vusallyv.

Internal

0.110.0

Breaking Changes

  • 🐛 Fix unhandled growing memory for internal server errors, refactor dependencies withyield andexcept to require raising again as in regular Python. PR#11191 by@tiangolo.
    • This is a breaking change (and only slightly) if you used dependencies withyield, usedexcept in those dependencies, and didn't raise again.
    • This was reported internally by@rushilsrivastava as a memory leak when the server had unhandled exceptions that would produce internal server errors, the memory allocated before that point would not be released.
    • Read the new docs:Dependencies withyield andexcept.

In short, if you had dependencies that looked like:

defmy_dep():try:yieldexceptSomeException:pass

Now you need to make sure you raise again afterexcept, just as you would in regular Python:

defmy_dep():try:yieldexceptSomeException:raise

Docs

Translations

  • 🌐 Add German translation fordocs/de/docs/reference/background.md. PR#10820 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/templating.md. PR#10842 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/external-links.md. PR#10852 by@nilslindemann.
  • 🌐 Update Turkish translation fordocs/tr/docs/tutorial/query-params.md. PR#11162 by@hasansezertasan.
  • 🌐 Add German translation fordocs/de/docs/reference/encoders.md. PR#10840 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/responses.md. PR#10825 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/reference/request.md. PR#10821 by@nilslindemann.
  • 🌐 Add Turkish translation fordocs/tr/docs/tutorial/query-params.md. PR#11078 by@emrhnsyts.
  • 🌐 Add German translation fordocs/de/docs/reference/fastapi.md. PR#10813 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/newsletter.md. PR#10853 by@nilslindemann.
  • 🌐 Add Traditional Chinese translation fordocs/zh-hant/docs/learn/index.md. PR#11142 by@hsuanchi.
  • 🌐 Add Korean translation for/docs/ko/docs/tutorial/dependencies/global-dependencies.md. PR#11123 by@riroan.
  • 🌐 Add Korean translation for/docs/ko/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#11124 by@riroan.
  • 🌐 Add Korean translation for/docs/ko/docs/tutorial/schema-extra-example.md. PR#11121 by@KaniKim.
  • 🌐 Add Korean translation for/docs/ko/docs/tutorial/body-fields.md. PR#11112 by@KaniKim.
  • 🌐 Add Korean translation for/docs/ko/docs/tutorial/cookie-params.md. PR#11118 by@riroan.
  • 🌐 Update Korean translation for/docs/ko/docs/dependencies/index.md. PR#11114 by@KaniKim.
  • 🌐 Update Korean translation for/docs/ko/docs/deployment/docker.md. PR#11113 by@KaniKim.
  • 🌐 Update Turkish translation fordocs/tr/docs/tutorial/first-steps.md. PR#11094 by@hasansezertasan.
  • 🌐 Add Spanish translation fordocs/es/docs/advanced/security/index.md. PR#2278 by@Xaraxx.
  • 🌐 Add Spanish translation fordocs/es/docs/advanced/response-headers.md. PR#2276 by@Xaraxx.
  • 🌐 Add Spanish translation fordocs/es/docs/deployment/index.md and~/deployment/versions.md. PR#9669 by@pabloperezmoya.
  • 🌐 Add Spanish translation fordocs/es/docs/benchmarks.md. PR#10928 by@pablocm83.
  • 🌐 Add Spanish translation fordocs/es/docs/advanced/response-change-status-code.md. PR#11100 by@alejsdev.

0.109.2

Upgrades

Translations

  • 🌐 Update Turkish translation fordocs/tr/docs/fastapi-people.md. PR#10547 by@alperiox.

Internal

0.109.1

Security fixes

  • ⬆️ Upgrade minimum version ofpython-multipart to>=0.0.7 to fix a vulnerability when using form data with a ReDos attack. You can also simply upgradepython-multipart.

Read more in theadvisory: Content-Type Header ReDoS.

Features

Refactors

  • ✅ Refactor tests for duplicate operation ID generation for compatibility with other tools running the FastAPI test suite. PR#10876 by@emmettbutler.
  • ♻️ Simplify string format with f-strings infastapi/utils.py. PR#10576 by@eukub.
  • 🔧 Fix Ruff configuration unintentionally enabling and re-disabling mccabe complexity check. PR#10893 by@jiridanek.
  • ✅ Re-enable test intests/test_tutorial/test_header_params/test_tutorial003.py after fix in Starlette. PR#10904 by@ooknimm.

Docs

  • 📝 Tweak wording inhelp-fastapi.md. PR#11040 by@tiangolo.
  • 📝 Tweak docs for Behind a Proxy. PR#11038 by@tiangolo.
  • 📝 Add External Link: 10 Tips for adding SQLAlchemy to FastAPI. PR#11036 by@Donnype.
  • 📝 Add External Link: Tips on migrating from Flask to FastAPI and vice-versa. PR#11029 by@jtemporal.
  • 📝 Deprecate old tutorials: Peewee, Couchbase, encode/databases. PR#10979 by@tiangolo.
  • ✏️ Fix typo infastapi/security/oauth2.py. PR#10972 by@RafalSkolasinski.
  • 📝 UpdateHTTPException details indocs/en/docs/tutorial/handling-errors.md. PR#5418 by@papb.
  • ✏️ A few tweaks indocs/de/docs/tutorial/first-steps.md. PR#10959 by@nilslindemann.
  • ✏️ Fix link indocs/en/docs/advanced/async-tests.md. PR#10960 by@nilslindemann.
  • ✏️ Fix typos for Spanish documentation. PR#10957 by@jlopezlira.
  • 📝 Add warning about lifespan functions and backwards compatibility with events. PR#10734 by@jacob-indigo.
  • ✏️ Fix broken link indocs/tutorial/sql-databases.md in several languages. PR#10716 by@theoohoho.
  • ✏️ Remove broken links fromexternal_links.yml. PR#10943 by@Torabek.
  • 📝 Update template docs with more info abouturl_for. PR#5937 by@EzzEddin.
  • 📝 Update usage of Token model in security docs. PR#9313 by@piotrszacilowski.
  • ✏️ Update highlighted line indocs/en/docs/tutorial/bigger-applications.md. PR#5490 by@papb.
  • 📝 Add External Link: Explore How to Effectively Use JWT With FastAPI. PR#10212 by@aanchlia.
  • 📝 Add hyperlink todocs/en/docs/tutorial/static-files.md. PR#10243 by@hungtsetse.
  • 📝 Add External Link: Instrument a FastAPI service adding tracing with OpenTelemetry and send/show traces in Grafana Tempo. PR#9440 by@softwarebloat.
  • 📝 Review and rewording ofen/docs/contributing.md. PR#10480 by@nilslindemann.
  • 📝 Add External Link: ML serving and monitoring with FastAPI and Evidently. PR#9701 by@mnrozhkov.
  • 📝 Reword in docs, from "have in mind" to "keep in mind". PR#10376 by@malicious.
  • 📝 Add External Link: Talk by Jeny Sadadia. PR#10265 by@JenySadadia.
  • 📝 Add location info totutorial/bigger-applications.md. PR#10552 by@nilslindemann.
  • ✏️ Fix Pydantic method name indocs/en/docs/advanced/path-operation-advanced-configuration.md. PR#10826 by@ahmedabdou14.

Translations

  • 🌐 Add Spanish translation fordocs/es/docs/external-links.md. PR#10933 by@pablocm83.
  • 🌐 Update Korean translation fordocs/ko/docs/tutorial/first-steps.md,docs/ko/docs/tutorial/index.md,docs/ko/docs/tutorial/path-params.md, anddocs/ko/docs/tutorial/query-params.md. PR#4218 by@SnowSuno.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/dependencies/dependencies-with-yield.md. PR#10870 by@zhiquanchi.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/concepts.md. PR#10282 by@xzmeng.
  • 🌐 Add Azerbaijani translation fordocs/az/docs/index.md. PR#11047 by@aykhans.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/middleware.md. PR#2829 by@JeongHyeongKim.
  • 🌐 Add German translation fordocs/de/docs/tutorial/body-nested-models.md. PR#10313 by@nilslindemann.
  • 🌐 Add Persian translation fordocs/fa/docs/tutorial/middleware.md. PR#9695 by@mojtabapaso.
  • 🌐 Update Farsi translation fordocs/fa/docs/index.md. PR#10216 by@theonlykingpin.
  • 🌐 Add German translation fordocs/de/docs/tutorial/body-fields.md. PR#10310 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/body.md. PR#10295 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/body-multiple-params.md. PR#10308 by@nilslindemann.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/security/get-current-user.md. PR#2681 by@sh0nk.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/advanced-dependencies.md. PR#3798 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/events.md. PR#3815 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/behind-a-proxy.md. PR#3820 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/testing-events.md. PR#3818 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/testing-websockets.md. PR#3817 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/testing-database.md. PR#3821 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/deta.md. PR#3837 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/history-design-future.md. PR#3832 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/project-generation.md. PR#3831 by@jaystone776.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/docker.md. PR#10296 by@xzmeng.
  • 🌐 Update Spanish translation fordocs/es/docs/features.md. PR#10884 by@pablocm83.
  • 🌐 Add Spanish translation fordocs/es/docs/newsletter.md. PR#10922 by@pablocm83.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/background-tasks.md. PR#5910 by@junah201.
  • :globe_with_meridians: Add Turkish translation fordocs/tr/docs/alternatives.md. PR#10502 by@alperiox.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/dependencies/index.md. PR#10989 by@KaniKim.
  • 🌐 Add Korean translation for/docs/ko/docs/tutorial/body.md. PR#11000 by@KaniKim.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/schema-extra-example.md. PR#4065 by@luccasmmg.
  • 🌐 Add Turkish translation fordocs/tr/docs/history-design-future.md. PR#11012 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/resources/index.md. PR#11020 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/how-to/index.md. PR#11021 by@hasansezertasan.
  • 🌐 Add German translation fordocs/de/docs/tutorial/query-params.md. PR#10293 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/benchmarks.md. PR#10866 by@nilslindemann.
  • 🌐 Add Turkish translation fordocs/tr/docs/learn/index.md. PR#11014 by@hasansezertasan.
  • 🌐 Add Persian translation fordocs/fa/docs/tutorial/security/index.md. PR#9945 by@mojtabapaso.
  • 🌐 Add Turkish translation fordocs/tr/docs/help/index.md. PR#11013 by@hasansezertasan.
  • 🌐 Add Turkish translation fordocs/tr/docs/about/index.md. PR#11006 by@hasansezertasan.
  • 🌐 Update Turkish translation fordocs/tr/docs/benchmarks.md. PR#11005 by@hasansezertasan.
  • 🌐 Add Italian translation fordocs/it/docs/index.md. PR#5233 by@matteospanio.
  • 🌐 Add Korean translation fordocs/ko/docs/help/index.md. PR#10983 by@KaniKim.
  • 🌐 Add Korean translation fordocs/ko/docs/features.md. PR#10976 by@KaniKim.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/security/get-current-user.md. PR#5737 by@KdHyeon0661.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/security/first-steps.md. PR#10541 by@AlertRED.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/handling-errors.md. PR#10375 by@AlertRED.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/encoder.md. PR#10374 by@AlertRED.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/body-updates.md. PR#10373 by@AlertRED.
  • 🌐 Russian translation: updatedfastapi-people.md.. PR#10255 by@NiKuma0.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/security/index.md. PR#5798 by@3w36zj6.
  • 🌐 Add German translation fordocs/de/docs/advanced/generate-clients.md. PR#10725 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/openapi-webhooks.md. PR#10712 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/custom-response.md. PR#10624 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/advanced/additional-status-codes.md. PR#10617 by@nilslindemann.
  • 🌐 Add German translation fordocs/de/docs/tutorial/middleware.md. PR#10391 by@JohannesJungbluth.
  • 🌐 Add German translation for introduction documents. PR#10497 by@nilslindemann.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/encoder.md. PR#1955 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/extra-data-types.md. PR#1932 by@SwftAlpc.
  • 🌐 Add Turkish translation fordocs/tr/docs/async.md. PR#5191 by@BilalAlpaslan.
  • 🌐 Add Turkish translation fordocs/tr/docs/project-generation.md. PR#5192 by@BilalAlpaslan.
  • 🌐 Add Korean translation fordocs/ko/docs/deployment/docker.md. PR#5657 by@nearnear.
  • 🌐 Add Korean translation fordocs/ko/docs/deployment/server-workers.md. PR#4935 by@jujumilk3.
  • 🌐 Add Korean translation fordocs/ko/docs/deployment/index.md. PR#4561 by@jujumilk3.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/path-operation-configuration.md. PR#3639 by@jungsu-kwon.
  • 🌐 Modify the description ofzh - Traditional Chinese. PR#10889 by@cherinyy.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/static-files.md. PR#2957 by@jeesang7.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/response-model.md. PR#2766 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/body-multiple-params.md. PR#2461 by@PandaHun.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/query-params-str-validations.md. PR#2415 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/python-types.md. PR#2267 by@jrim.
  • 🌐 Add Korean translation fordocs/ko/docs/tutorial/body-nested-models.md. PR#2506 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/learn/index.md. PR#10977 by@KaniKim.
  • 🌐 Initialize translations for Traditional Chinese. PR#10505 by@hsuanchi.
  • ✏️ Tweak the german translation ofdocs/de/docs/tutorial/index.md. PR#10962 by@nilslindemann.
  • ✏️ Fix typo error indocs/ko/docs/tutorial/path-params.md. PR#10758 by@2chanhaeng.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/dependencies/dependencies-with-yield.md. PR#1961 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#1960 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/dependencies/sub-dependencies.md. PR#1959 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/background-tasks.md. PR#2668 by@tokusumi.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/dependencies/index.md anddocs/ja/docs/tutorial/dependencies/classes-as-dependencies.md. PR#1958 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/response-model.md. PR#1938 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/body-multiple-params.md. PR#1903 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/path-params-numeric-validations.md. PR#1902 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/python-types.md. PR#1899 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/handling-errors.md. PR#1953 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/response-status-code.md. PR#1942 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/extra-models.md. PR#1941 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/schema-extra-example.md. PR#1931 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/body-nested-models.md. PR#1930 by@SwftAlpc.
  • 🌐 Add Japanese translation fordocs/ja/docs/tutorial/body-fields.md. PR#1923 by@SwftAlpc.
  • 🌐 Add German translation fordocs/de/docs/tutorial/index.md. PR#9502 by@fhabers21.
  • 🌐 Add German translation fordocs/de/docs/tutorial/background-tasks.md. PR#10566 by@nilslindemann.
  • ✏️ Fix typo indocs/ru/docs/index.md. PR#10672 by@Delitel-WEB.
  • ✏️ Fix typos indocs/zh/docs/tutorial/extra-data-types.md. PR#10727 by@HiemalBeryl.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/dependencies/classes-as-dependencies.md. PR#10410 by@AlertRED.

Internal

0.109.0

Features

Upgrades

Docs

  • ✏️ Fix typo indocs/en/docs/alternatives.md. PR#10931 by@s111d.
  • 📝 Replaceemail withusername indocs_src/security/tutorial007 code examples. PR#10649 by@nilslindemann.
  • 📝 Add VS Code tutorial link. PR#10592 by@nilslindemann.
  • 📝 Add notes about Pydantic v2's new.model_dump(). PR#10929 by@tiangolo.
  • 📝 Fix broken link indocs/en/docs/tutorial/sql-databases.md. PR#10765 by@HurSungYun.
  • 📝 Add External Link: FastAPI application monitoring made easy. PR#10917 by@tiangolo.
  • ✨ Generate automatic language names for docs translations. PR#5354 by@jakul.
  • ✏️ Fix typos indocs/en/docs/alternatives.md anddocs/en/docs/tutorial/dependencies/index.md. PR#10906 by@s111d.
  • ✏️ Fix typos indocs/en/docs/tutorial/dependencies/dependencies-with-yield.md. PR#10834 by@Molkree.
  • 📝 Add article: "Building a RESTful API with FastAPI: Secure Signup and Login Functionality Included". PR#9733 by@dxphilo.
  • 📝 Add warning about lifecycle events withAsyncClient. PR#4167 by@andrew-chang-dewitt.
  • ✏️ Fix typos in/docs/reference/exceptions.md and/en/docs/reference/status.md. PR#10809 by@clarencepenz.
  • ✏️ Fix typo inopenapi-callbacks.md. PR#10673 by@kayjan.
  • ✏️ Fix typo infastapi/routing.py . PR#10520 by@sepsh.
  • 📝 Replace HTTP code returned in case of existing user error in docs for testing. PR#4482 by@TristanMarion.
  • 📝 Add blog for FastAPI & Supabase. PR#6018 by@theinfosecguy.
  • 📝 Update example source files for SQL databases with SQLAlchemy. PR#9508 by@s-mustafa.
  • 📝 Update code examples in docs for body, replace namecreate_item withupdate_item when appropriate. PR#5913 by@OttoAndrey.
  • ✏️ Fix typo in dependencies with yield source examples. PR#10847 by@tiangolo.

Translations

  • 🌐 Add Bengali translation fordocs/bn/docs/index.md. PR#9177 by@Fahad-Md-Kamal.
  • ✏️ Update Python version inindex.md in several languages. PR#10711 by@tamago3keran.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/request-forms-and-files.md. PR#10347 by@AlertRED.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/index.md. PR#10362 by@rostik1410.
  • ✏️ Update Python version indocs/ko/docs/index.md. PR#10680 by@Eeap.
  • 🌐 Add Persian translation fordocs/fa/docs/features.md. PR#5887 by@amirilf.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/additional-responses.md. PR#10325 by@ShuibeiC.
  • 🌐 Fix typos in Russian translations fordocs/ru/docs/tutorial/background-tasks.md,docs/ru/docs/tutorial/body-nested-models.md,docs/ru/docs/tutorial/debugging.md,docs/ru/docs/tutorial/testing.md. PR#10311 by@AlertRED.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/request-files.md. PR#10332 by@AlertRED.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/server-workers.md. PR#10292 by@xzmeng.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/cloud.md. PR#10291 by@xzmeng.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/manually.md. PR#10279 by@xzmeng.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/https.md. PR#10277 by@xzmeng.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/index.md. PR#10275 by@xzmeng.
  • 🌐 Add German translation fordocs/de/docs/tutorial/first-steps.md. PR#9530 by@fhabers21.
  • 🌐 Update Turkish translation fordocs/tr/docs/index.md. PR#10444 by@hasansezertasan.
  • 🌐 Add Chinese translation fordocs/zh/docs/learn/index.md. PR#10479 by@KAZAMA-DREAM.
  • 🌐 Add Russian translation fordocs/ru/docs/learn/index.md. PR#10539 by@AlertRED.
  • 🌐 Update SQLAlchemy instruction in Chinese translationdocs/zh/docs/tutorial/sql-databases.md. PR#9712 by@Royc30ne.
  • 🌐 Add Turkish translation fordocs/tr/docs/external-links.md. PR#10549 by@hasansezertasan.
  • 🌐 Add Spanish translation fordocs/es/docs/learn/index.md. PR#10885 by@pablocm83.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/body-fields.md. PR#10670 by@ArtemKhymenko.
  • 🌐 Add Hungarian translation for/docs/hu/docs/index.md. PR#10812 by@takacs.
  • 🌐 Add Turkish translation fordocs/tr/docs/newsletter.md. PR#10550 by@hasansezertasan.
  • 🌐 Add Spanish translation fordocs/es/docs/help/index.md. PR#10907 by@pablocm83.
  • 🌐 Add Spanish translation fordocs/es/docs/about/index.md. PR#10908 by@pablocm83.
  • 🌐 Add Spanish translation fordocs/es/docs/resources/index.md. PR#10909 by@pablocm83.

Internal

0.108.0

Upgrades

  • ⬆️ Upgrade Starlette to>=0.29.0,<0.33.0, update docs and usage of templates with new Starlette arguments. Remove pin of AnyIO>=3.7.1,<4.0.0, add support for AnyIO 4.x.x. PR#10846 by@tiangolo.

0.107.0

Upgrades

Docs

  • 📝 Add docs: Node.js script alternative to update OpenAPI for generated clients. PR#10845 by@alejsdev.
  • 📝 Restructure Docs section in Contributing page. PR#10844 by@alejsdev.

0.106.0

Breaking Changes

Using resources from dependencies withyield in background tasks is no longer supported.

This change is what supports the new features, read below. 🤓

Dependencies withyield,HTTPException and Background Tasks

Dependencies withyield now can raiseHTTPException and other exceptions afteryield. 🎉

Read the new docs here:Dependencies withyield andHTTPException.

fromfastapiimportDepends,FastAPI,HTTPExceptionfromtyping_extensionsimportAnnotatedapp=FastAPI()data={"plumbus":{"description":"Freshly pickled plumbus","owner":"Morty"},"portal-gun":{"description":"Gun to create portals","owner":"Rick"},}classOwnerError(Exception):passdefget_username():try:yield"Rick"exceptOwnerErrorase:raiseHTTPException(status_code=400,detail=f"Owner error:{e}")@app.get("/items/{item_id}")defget_item(item_id:str,username:Annotated[str,Depends(get_username)]):ifitem_idnotindata:raiseHTTPException(status_code=404,detail="Item not found")item=data[item_id]ifitem["owner"]!=username:raiseOwnerError(username)returnitem

Before FastAPI 0.106.0, raising exceptions afteryield was not possible, the exit code in dependencies withyield was executedafter the response was sent, soException Handlers would have already run.

This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished.

Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0.

Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).

If you used to rely on this behavior, now you should create the resources for background tasks inside the background task itself, and use internally only data that doesn't depend on the resources of dependencies withyield.

For example, instead of using the same database session, you would create a new database session inside of the background task, and you would obtain the objects from the database using this new session. And then instead of passing the object from the database as a parameter to the background task function, you would pass the ID of that object and then obtain the object again inside the background task function.

The sequence of execution before FastAPI 0.106.0 was like this diagram:

Time flows from top to bottom. And each column is one of the parts interacting or executing code.

sequenceDiagramparticipant client as Clientparticipant handler as Exception handlerparticipant dep as Dep with yieldparticipant operation as Path Operationparticipant tasks as Background tasks    Note over client,tasks: Can raise exception for dependency, handled after response is sent    Note over client,operation: Can raise HTTPException and can change the response    client ->> dep: Start request    Note over dep: Run code up to yield    opt raise        dep -->> handler: Raise HTTPException        handler -->> client: HTTP error response        dep -->> dep: Raise other exception    end    dep ->> operation: Run dependency, e.g. DB session    opt raise        operation -->> dep: Raise HTTPException        dep -->> handler: Auto forward exception        handler -->> client: HTTP error response        operation -->> dep: Raise other exception        dep -->> handler: Auto forward exception    end    operation ->> client: Return response to client    Note over client,operation: Response is already sent, can't change it anymore    opt Tasks        operation -->> tasks: Send background tasks    end    opt Raise other exception        tasks -->> dep: Raise other exception    end    Note over dep: After yield    opt Handle other exception        dep -->> dep: Handle exception, can't change response. E.g. close DB session.    end

The new execution flow can be found in the docs:Execution of dependencies withyield.

Features

  • ✨ Add support for raising exceptions (includingHTTPException) in dependencies withyield in the exit code, do not support them in background tasks. PR#10831 by@tiangolo.

Internal

0.105.0

Features

  • ✨ Add support for multiple Annotated annotations, e.g.Annotated[str, Field(), Query()]. PR#10773 by@tiangolo.

Refactors

Docs

  • 📝 Tweak default suggested configs for generating clients. PR#10736 by@tiangolo.

Internal

0.104.1

Fixes

  • 📌 Pin Swagger UI version to 5.9.0 temporarily to handle a bug crashing it in 5.9.1. PR#10529 by@alejandraklachquin.
    • This is not really a bug in FastAPI but in Swagger UI, nevertheless pinning the version will work while a solution is found on theSwagger UI side.

Docs

  • 📝 Update data structure and render for external-links. PR#10495 by@tiangolo.
  • ✏️ Fix link to SPDX license identifier indocs/en/docs/tutorial/metadata.md. PR#10433 by@worldworm.
  • 📝 Update example validation error from Pydantic v1 to match Pydantic v2 indocs/en/docs/tutorial/path-params.md. PR#10043 by@giuliowaitforitdavide.
  • ✏️ Fix typos in emoji docs and in some source examples. PR#10438 by@afuetterer.
  • ✏️ Fix typo indocs/en/docs/reference/dependencies.md. PR#10465 by@suravshresth.
  • ✏️ Fix typos and rewordings indocs/en/docs/tutorial/body-nested-models.md. PR#10468 by@yogabonito.
  • 📝 Update docs, remove references to removedpydantic.Required indocs/en/docs/tutorial/query-params-str-validations.md. PR#10469 by@yogabonito.
  • ✏️ Fix typo indocs/en/docs/reference/index.md. PR#10467 by@tarsil.
  • 🔥 Remove unnecessary duplicated docstrings. PR#10484 by@tiangolo.

Internal

0.104.0

Features

Upgrades

  • ⬆️ Drop support for Python 3.7, require Python 3.8 or above. PR#10442 by@tiangolo.

Internal

0.103.2

Refactors

  • ⬆️ Upgrade compatibility with Pydantic v2.4, new renamed functions and JSON Schema input/output models with default values. PR#10344 by@tiangolo.

Translations

  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/extra-data-types.md. PR#10132 by@ArtemKhymenko.
  • 🌐 Fix typos in French translations fordocs/fr/docs/advanced/path-operation-advanced-configuration.md,docs/fr/docs/alternatives.md,docs/fr/docs/async.md,docs/fr/docs/features.md,docs/fr/docs/help-fastapi.md,docs/fr/docs/index.md,docs/fr/docs/python-types.md,docs/fr/docs/tutorial/body.md,docs/fr/docs/tutorial/first-steps.md,docs/fr/docs/tutorial/query-params.md. PR#10154 by@s-rigaud.
  • 🌐 Add Chinese translation fordocs/zh/docs/async.md. PR#5591 by@mkdir700.
  • 🌐 Update Chinese translation fordocs/tutorial/security/simple-oauth2.md. PR#3844 by@jaystone776.
  • 🌐 Add Korean translation fordocs/ko/docs/deployment/cloud.md. PR#10191 by@Sion99.
  • 🌐 Add Japanese translation fordocs/ja/docs/deployment/https.md. PR#10298 by@tamtam-fitness.
  • 🌐 Fix typo in Russian translation fordocs/ru/docs/tutorial/body-fields.md. PR#10224 by@AlertRED.
  • 🌐 Add Polish translation fordocs/pl/docs/help-fastapi.md. PR#10121 by@romabozhanovgithub.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/header-params.md. PR#10226 by@AlertRED.
  • 🌐 Add Chinese translation fordocs/zh/docs/deployment/versions.md. PR#10276 by@xzmeng.

Internal

0.103.1

Fixes

  • 📌 Pin AnyIO to < 4.0.0 to handle an incompatibility while upgrading to Starlette 0.31.1. PR#10194 by@tiangolo.

Docs

  • ✏️ Fix validation parameter name in docs, fromregex topattern. PR#10085 by@pablodorrio.
  • ✏️ Fix indent format indocs/en/docs/deployment/server-workers.md. PR#10066 by@tamtam-fitness.
  • ✏️ Fix Pydantic examples in tutorial for Python types. PR#9961 by@rahulsalgare.
  • ✏️ Fix link to Pydantic docs indocs/en/docs/tutorial/extra-data-types.md. PR#10155 by@hasnatsajid.
  • ✏️ Fix typo indocs/en/docs/tutorial/handling-errors.md. PR#10170 by@poupapaa.
  • ✏️ Fix typo indocs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#10172 by@ragul-kachiappan.

Translations

  • 🌐 Remove duplicate line in translation fordocs/pt/docs/tutorial/path-params.md. PR#10126 by@LecoOliveira.
  • 🌐 Add Yoruba translation fordocs/yo/docs/index.md. PR#10033 by@AfolabiOlaoluwa.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/python-types.md. PR#10080 by@rostik1410.
  • 🌐 Add Vietnamese translations fordocs/vi/docs/tutorial/first-steps.md anddocs/vi/docs/tutorial/index.md. PR#10088 by@magiskboy.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/alternatives.md. PR#10060 by@whysage.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/index.md. PR#10079 by@rostik1410.
  • ✏️ Fix typos indocs/en/docs/how-to/separate-openapi-schemas.md anddocs/en/docs/tutorial/schema-extra-example.md. PR#10189 by@xzmeng.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/generate-clients.md. PR#9883 by@funny-cat-happy.

Refactors

  • ✏️ Fix typos in comment infastapi/applications.py. PR#10045 by@AhsanSheraz.
  • ✅ Add missing test for OpenAPI examples, it was missing in coverage. PR#10188 by@tiangolo.

Internal

0.103.0

Features

Docs

  • 📝 Add note to docs about Separate Input and Output Schemas with FastAPI version. PR#10150 by@tiangolo.

0.102.0

Features

Refactors

Docs

  • 📝 Add new docs section, How To - Recipes, move docs that don't have to be read by everyone to How To. PR#10114 by@tiangolo.
  • 📝 Update Advanced docs, add links to sponsor courses. PR#10113 by@tiangolo.
  • 📝 Update docs for generating clients. PR#10112 by@tiangolo.
  • 📝 Tweak MkDocs and add redirects. PR#10111 by@tiangolo.
  • 📝 Restructure docs for cloud providers, include links to sponsors. PR#10110 by@tiangolo.

Internal

0.101.1

Fixes

  • ✨ AddResponseValidationError printable details, to show up in server error logs. PR#10078 by@tiangolo.

Refactors

  • ✏️ Fix typo in deprecation warnings infastapi/params.py. PR#9854 by@russbiggs.
  • ✏️ Fix typos in comments on internal code infastapi/concurrency.py andfastapi/routing.py. PR#9590 by@ElliottLarsen.

Docs

Translations

  • 🌐 Add Japanese translation fordocs/ja/docs/deployment/concepts.md. PR#10062 by@tamtam-fitness.
  • 🌐 Add Japanese translation fordocs/ja/docs/deployment/server-workers.md. PR#10064 by@tamtam-fitness.
  • 🌐 Update Japanese translation fordocs/ja/docs/deployment/docker.md. PR#10073 by@tamtam-fitness.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/fastapi-people.md. PR#10059 by@rostik1410.
  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/cookie-params.md. PR#10032 by@rostik1410.
  • 🌐 Add Russian translation fordocs/ru/docs/deployment/docker.md. PR#9971 by@Xewus.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/python-types.md. PR#10047 by@magiskboy.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/dependencies/global-dependencies.md. PR#9970 by@dudyaosuplayer.
  • 🌐 Add Urdu translation fordocs/ur/docs/benchmarks.md. PR#9974 by@AhsanSheraz.

Internal

0.101.0

Features

  • ✨ Enable Pydantic's serialization mode for responses, add support for Pydantic'scomputed_field, better OpenAPI for response models, proper required attributes, better generated clients. PR#10011 by@tiangolo.

Refactors

  • ✅ Fix tests for compatibility with pydantic 2.1.1. PR#9943 by@dmontagu.
  • ✅ Fix test error in Windows forjsonable_encoder. PR#9840 by@iudeen.

Upgrades

  • 📌 Do not allow Pydantic 2.1.0 that breaks (require 2.1.1). PR#10012 by@tiangolo.

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/security/index.md. PR#9963 by@eVery1337.
  • 🌐 Remove Vietnamese note about missing translation. PR#9957 by@tiangolo.

Internal

0.100.1

Fixes

  • 🐛 ReplaceMultHostUrl toAnyUrl for compatibility with older versions of Pydantic v1. PR#9852 by@Kludex.

Docs

  • 📝 Update links for self-hosted Swagger UI, point to v5, for OpenAPI 31.0. PR#9834 by@tiangolo.

Translations

  • 🌐 Add Ukrainian translation fordocs/uk/docs/tutorial/body.md. PR#4574 by@ss-o-furda.
  • 🌐 Add Vietnamese translation fordocs/vi/docs/features.md anddocs/vi/docs/index.md. PR#3006 by@magiskboy.
  • 🌐 Add Korean translation fordocs/ko/docs/async.md. PR#4179 by@NinaHwang.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/background-tasks.md. PR#9812 by@wdh99.
  • 🌐 Add French translation fordocs/fr/docs/tutorial/query-params-str-validations.md. PR#4075 by@Smlep.
  • 🌐 Add French translation fordocs/fr/docs/tutorial/index.md. PR#2234 by@JulianMaurin.
  • 🌐 Add French translation fordocs/fr/docs/contributing.md. PR#2132 by@JulianMaurin.
  • 🌐 Add French translation fordocs/fr/docs/benchmarks.md. PR#2155 by@clemsau.
  • 🌐 Update Chinese translations with new source files. PR#9738 by@mahone3297.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/request-forms.md. PR#9841 by@dedkot01.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/handling-errors.md. PR#9485 by@Creat55.

Internal

0.100.0

✨ Support forPydantic v2

Pydantic version 2 has thecore re-written inRust and includes a lot of improvements and features, for example:

  • Improvedcorrectness in corner cases.
  • Safer types.
  • Betterperformance andless energy consumption.
  • Betterextensibility.
  • etc.

...all this while keeping thesame 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 of20x or more. This means 2,000% or more. 🤯

When you useFastAPI, there's a lot more going on, processing the request and response, handling dependencies, executingyour 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 iscompatibility 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 thenperformance improvements. Some third-party early beta testers that ran benchmarks on the beta releases of FastAPI reported improvements of2x - 3x. Which is not bad for just doingpip install --upgrade fastapi pydantic. This was not an official benchmark and I didn't check it myself, but it's a good sign.

Migration

Check out thePydantic migration guide.

For the things that need changes in your Pydantic models, the Pydantic team builtbump-pydantic.

A command line tool that willprocess your code and update most of the thingsautomatically 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 v1

This version of FastAPI still supports Pydantic v1. And although Pydantic v1 will be deprecated at some point, it 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 aretests for both Pydantic v1 and v2, and testcoverage is kept at100%.

Changes

  • There arenew parameter fields supported by PydanticField() 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 parameterregex has been deprecated and replaced bypattern.
  • New Pydantic models use an improved and simplified attributemodel_config that takes a simple dict instead of an internal classConfig for their configuration.
  • The attributeschema_extra for the internal classConfig has been replaced by the keyjson_schema_extra in the newmodel_config dict.
  • When you install"fastapi[all]" it now also includes:
  • Now Pydantic Settings is an additional optional package (included in"fastapi[all]"). To use settings you should now importfrom pydantic_settings import BaseSettings instead of importing frompydantic directly.

  • PR#9816 by@tiangolo, included all the work done (in multiple PRs) on the beta branch (main-pv2).

0.99.1

Fixes

  • 🐛 Fix JSON Schema accepting bools as valid JSON Schemas, e.g.additionalProperties: false. PR#9781 by@tiangolo.

Docs

  • 📝 Update source examples to use new JSON Schema examples field. PR#9776 by@tiangolo.

0.99.0

Features

  • ✨ Add support for OpenAPI 3.1.0. PR#9770 by@tiangolo.

    • New support for documentingwebhooks, 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.
    • Updatedexamples field inQuery(),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 fordeque objects and children injsonable_encoder. PR#9433 by@cranium.

Docs

  • 📝 Fix form for the FastAPI and friends newsletter. PR#9749 by@tiangolo.

Translations

  • 🌐 Add Persian translation fordocs/fa/docs/advanced/sub-applications.md. PR#9692 by@mojtabapaso.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/response-model.md. PR#9675 by@glsglsgls.

Internal

  • 🔨 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.0

Features

  • ✨ Allow disablingredirect_slashes at the FastAPI app level. PR#3432 by@cyberlis.

Docs

  • 📝 Update docs on Pydantic using ujson internally. PR#5804 by@mvasilkov.
  • ✏ Rewording indocs/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 indocs/en/docs/tutorial/security/index.md. PR#9561 by@jyothish-mohan.
  • 📝 UpdateAnnotated notes indocs/en/docs/tutorial/schema-extra-example.md. PR#9620 by@Alexandrhub.
  • ✏️ Fix typoAnnotation ->Annotated indocs/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.

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/metadata.md. PR#9681 by@TabarakoAkula.
  • 🌐 Fix typo in Spanish translation fordocs/es/docs/tutorial/first-steps.md. PR#9571 by@lilidl-nft.
  • 🌐 Add Russian translation fordocs/tutorial/path-operation-configuration.md. PR#9696 by@TabarakoAkula.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/security/index.md. PR#9666 by@lordqyxz.
  • 🌐 Add Chinese translations fordocs/zh/docs/advanced/settings.md. PR#9652 by@ChoyeonChern.
  • 🌐 Add Chinese translations fordocs/zh/docs/advanced/websockets.md. PR#9651 by@ChoyeonChern.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/testing.md. PR#9641 by@wdh99.
  • 🌐 Add Russian translation fordocs/tutorial/extra-models.md. PR#9619 by@ivan-abc.
  • 🌐 Add Russian translation fordocs/tutorial/cors.md. PR#9608 by@ivan-abc.
  • 🌐 Add Polish translation fordocs/pl/docs/features.md. PR#5348 by@mbroton.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/body-nested-models.md. PR#9605 by@Alexandrhub.

Internal

0.97.0

Features

  • ✨ Add support fordependencies in WebSocket routes. PR#4534 by@paulo-raca.
  • ✨ Add exception handler forWebSocketRequestValidationError (which also allows to override it). PR#6030 by@kristjanvalur.

Refactors

  • ⬆️ 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.
  • ♻️ SimplifyAsyncExitStackMiddleware as without Python 3.6AsyncExitStack is always available. PR#9657 by@tiangolo.

Upgrades

Internal

  • 💚 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.1

Fixes

  • 🐛 FixHTTPException header type annotations. PR#9648 by@tiangolo.
  • 🐛 Fix OpenAPI model fields int validations,gte toge. PR#9635 by@tiangolo.

Upgrades

  • 📌 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.

Refactors

  • ♻ Removemedia_type fromORJSONResponse as it's inherited from the parent class. PR#5805 by@Kludex.
  • ♻ InstantiateHTTPException only when needed, optimization refactor. PR#5356 by@pawamoy.

Docs

  • 🔥 Remove link to Pydantic's benchmark, as it was removed there. PR#5811 by@Kludex.

Translations

  • 🌐 Fix spelling in Indonesian translation ofdocs/id/docs/tutorial/index.md. PR#5635 by@purwowd.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/index.md. PR#5896 by@Wilidon.
  • 🌐 Add Chinese translations fordocs/zh/docs/advanced/response-change-status-code.md anddocs/zh/docs/advanced/response-headers.md. PR#9544 by@ChoyeonChern.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/schema-extra-example.md. PR#9621 by@Alexandrhub.

Internal

  • 🔧 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.0

Features

  • ⚡ Updatecreate_cloned_field to use a global cache and improve startup performance. PR#4645 by@madkinsz and previous original PR by@huonw.

Docs

  • 📝 Update Deta deployment tutorial for compatibility with Deta Space. PR#6004 by@mikBighne98.
  • ✏️ Fix typo in Deta deployment tutorial. PR#9501 by@lemonyte.

Translations

  • 🌐 Add Russian translation fordocs/tutorial/body.md. PR#3885 by@solomein-sv.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/static-files.md. PR#9580 by@Alexandrhub.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/query-params.md. PR#9584 by@Alexandrhub.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/first-steps.md. PR#9471 by@AGolicyn.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/debugging.md. PR#9579 by@Alexandrhub.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/path-params.md. PR#9519 by@AGolicyn.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/static-files.md. PR#9436 by@wdh99.
  • 🌐 Update Spanish translation including new illustrations indocs/es/docs/async.md. PR#9483 by@andresbermeoq.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/path-params-numeric-validations.md. PR#9563 by@ivan-abc.
  • 🌐 Add Russian translation fordocs/ru/docs/deployment/concepts.md. PR#9577 by@Xewus.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/body-multiple-params.md. PR#9586 by@Alexandrhub.

Internal

0.95.2

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/advanced/events.md. PR#9326 by@oandersonmagalhaes.
  • 🌐 Add Russian translation fordocs/ru/docs/deployment/manually.md. PR#9417 by@Xewus.
  • 🌐 Add setup for translations to Lao. PR#9396 by@TheBrown.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/testing.md. PR#9403 by@Xewus.
  • 🌐 Add Russian translation fordocs/ru/docs/deployment/https.md. PR#9428 by@Xewus.
  • ✏ Fix command to install requirements in Windows. PR#9445 by@MariiaRomanuik.
  • 🌐 Add French translation fordocs/fr/docs/advanced/response-directly.md. PR#9415 by@axel584.
  • 🌐 Initiate Czech translation setup. PR#9288 by@3p1463k.
  • ✏ Fix typo in Portuguese docs fordocs/pt/docs/index.md. PR#9337 by@lucasbalieiro.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/response-status-code.md. PR#9370 by@nadia3373.

Internal

0.95.1

Fixes

  • 🐛 Fix usingAnnotated in routers or path operations decorated multiple times. PR#9315 by@sharonyogev.

Docs

  • 🌐 🔠 📄 🐢 Translate docs to Emoji 🥳 🎉 💥 🤯 🤯. PR#5385 by@LeeeeT.
  • 📝 Add notification message warning about old versions of FastAPI not supportingAnnotated. PR#9298 by@grdworkin.
  • 📝 Fix typo indocs/en/docs/advanced/behind-a-proxy.md. PR#5681 by@Leommjr.
  • ✏ Fix wrong import from typing module in Persian translations fordocs/fa/docs/index.md. PR#6083 by@Kimiaattaei.
  • ✏️ Fix format, remove unnecessary asterisks indocs/en/docs/help-fastapi.md. PR#9249 by@armgabrielyan.
  • ✏ Fix typo indocs/en/docs/tutorial/query-params-str-validations.md. PR#9272 by@nicornk.
  • ✏ Fix typo/bug in inline code example indocs/en/docs/tutorial/query-params-str-validations.md. PR#9273 by@tim-habitat.
  • ✏ Fix typo indocs/en/docs/tutorial/path-params-numeric-validations.md. PR#9282 by@aadarsh977.
  • ✏ Fix typo: 'wll' to 'will' indocs/en/docs/tutorial/query-params-str-validations.md. PR#9380 by@dasstyxx.

Translations

  • 🌐 Add French translation fordocs/fr/docs/advanced/index.md. PR#5673 by@axel584.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/body-nested-models.md. PR#4053 by@luccasmmg.
  • 🌐 Add Russian translation fordocs/ru/docs/alternatives.md. PR#5994 by@Xewus.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/extra-models.md. PR#5912 by@LorhanSohaky.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/path-operation-configuration.md. PR#5936 by@LorhanSohaky.
  • 🌐 Add Russian translation fordocs/ru/docs/contributing.md. PR#6002 by@stigsanek.
  • 🌐 Add Korean translation fordocs/tutorial/dependencies/classes-as-dependencies.md. PR#9176 by@sehwan505.
  • 🌐 Add Russian translation fordocs/ru/docs/project-generation.md. PR#9243 by@Xewus.
  • 🌐 Add French translation fordocs/fr/docs/index.md. PR#9265 by@frabc.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/query-params-str-validations.md. PR#9267 by@dedkot01.
  • 🌐 Add Russian translation fordocs/ru/docs/benchmarks.md. PR#9271 by@Xewus.

Internal

  • 🔧 Update sponsors: remove Jina. PR#9388 by@tiangolo.
  • 🔧 Update sponsors, add databento, remove Ines's course and StriveWorks. PR#9351 by@tiangolo.

0.95.0

Highlights

This release adds support for dependencies and parameters usingAnnotated and recommends its usage. ✨

This hasseveral benefits, one of the main ones is that now the parameters of your functions withAnnotated wouldnot be affected at all.

If you call those functions inother places in your code, the actualdefault values will be kept, your editor will help you notice missingrequired arguments, Python will require you to pass required arguments atruntime, you will be able touse the same functions for different things and with different libraries (e.g.Typer will soon supportAnnotated too, then you could use the same function for an API and a CLI), etc.

BecauseAnnotated isstandard Python, you still get all thebenefits from editors and tools, likeautocompletion,inline errors, etc.

One of thebiggest benefits is that now you can createAnnotated dependencies that are then shared by multiplepath operation functions, this will allow you toreduce a lot ofcode duplication in your codebase, while keeping all the support from editors and tools.

For example, you could have code like this:

defget_current_user(token:str):# authenticate userreturnUser()@app.get("/items/")defread_items(user:User=Depends(get_current_user)):...@app.post("/items/")defcreate_item(*,user:User=Depends(get_current_user),item:Item):...@app.get("/items/{item_id}")defread_item(*,user:User=Depends(get_current_user),item_id:int):...@app.delete("/items/{item_id}")defdelete_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 thisAnnotated dependency:

CurrentUser=Annotated[User,Depends(get_current_user)]@app.get("/items/")defread_items(user:CurrentUser):...@app.post("/items/")defcreate_item(user:CurrentUser,item:Item):...@app.get("/items/{item_id}")defread_item(user:CurrentUser,item_id:int):...@app.delete("/items/{item_id}")defdelete_item(user:CurrentUser,item_id:int):...

...andCurrentUser has all the typing information asUser, so your editor will work as expected (autocompletion and everything), andFastAPI will be able to understand the dependency defined inAnnotated. 😎

Roughlyall the docs have been rewritten to useAnnotated as the main way to declareparameters anddependencies. All theexamples in the docs now include a version withAnnotated 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:

Special thanks to@nzig for the core implementation and to@adriangb for the inspiration and idea withXpresso! 🚀

Features

  • ✨Add support for PEP-593Annotated for specifying dependencies and parameters. PR#4871 by@nzig.

Docs

  • 📝 Tweak tip recommendingAnnotated 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 useAnnotated as the main recommendation, with new examples and tests. PR#9268 by@tiangolo.

0.94.1

Fixes

  • 🎨 Fix types for lifespan, upgrade Starlette to 0.26.1. PR#9245 by@tiangolo.

0.94.0

Upgrades

Docs

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/history-design-future.md. PR#5986 by@Xewus.

Internal

0.93.0

Features

  • ✨ Add support forlifespan async context managers (supersedingstartup andshutdown events). Initial PR#2944 by@uSpike.

Now, instead of using independentstartup andshutdown events, you can define that logic in a single function withyield decorated with@asynccontextmanager (an async context manager).

For example:

fromcontextlibimportasynccontextmanagerfromfastapiimportFastAPIdeffake_answer_to_everything_ml_model(x:float):returnx*42ml_models={}@asynccontextmanagerasyncdeflifespan(app:FastAPI):# Load the ML modelml_models["answer_to_everything"]=fake_answer_to_everything_ml_modelyield# Clean up the ML models and release the resourcesml_models.clear()app=FastAPI(lifespan=lifespan)@app.get("/predict")asyncdefpredict(x:float):result=ml_models["answer_to_everything"](x)return{"result":result}

Note: This is the recommended way going forward, instead of usingstartup andshutdown events.

Read more about it in the new docs:Advanced User Guide: Lifespan Events.

Docs

  • ✏ Fix formatting indocs/en/docs/tutorial/metadata.md forReDoc. PR#6005 by@eykamp.

Translations

  • 🌐 Tamil translations - initial setup. PR#5564 by@gusty1g.
  • 🌐 Add French translation fordocs/fr/docs/advanced/path-operation-advanced-configuration.md. PR#9221 by@axel584.
  • 🌐 Add French translation fordocs/tutorial/debugging.md. PR#9175 by@frabc.
  • 🌐 Initiate Armenian translation setup. PR#5844 by@har8.
  • 🌐 Add French translation fordeployment/manually.md. PR#3693 by@rjNemo.

Internal

  • 👷 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.0

🚨 This is a security fix. Please upgrade as soon as possible.

Upgrades

  • ⬆️ 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.0

Upgrades

  • ⬆️ Upgrade Starlette version to0.24.0 and refactor internals for compatibility. PR#5985 by@tiangolo.
    • This can solve nuanced errors when using middlewares. Before Starlette0.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.1

Upgrades

Docs

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/cookie-params.md. PR#5890 by@bnzone.

Internal

0.90.0

Upgrades

  • ⬆️ Bump Starlette from 0.22.0 to 0.23.0. Initial PR#5739 by@Kludex.

Docs

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/body-fields.md. PR#5898 by@simatheone.
  • 🌐 Add Russian translation fordocs/ru/docs/help-fastapi.md. PR#5970 by@tiangolo.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/static-files.md. PR#5858 by@batlopes.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/encoder.md. PR#5525 by@felipebpl.
  • 🌐 Add Russian translation fordocs/ru/docs/contributing.md. PR#5870 by@Xewus.

Internal

0.89.1

Fixes

  • 🐛 Ignore Response classes on return annotation. PR#5855 by@Kludex. See the new docs in the PR below.

Docs

Translations

0.89.0

Features

  • ✨ Add support for function return type annotations to declare theresponse_model. Initial PR#1436 by@uriyyo.

Now you can declare the return type /response_model in the function return type annotation:

fromfastapiimportFastAPIfrompydanticimportBaseModelapp=FastAPI()classItem(BaseModel):name:strprice:float@app.get("/items/")asyncdefread_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 theresponse_model parameter.

Read more about it in the new docs:Response Model - Return Type.

Docs

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/fastapi-people.md. PR#5577 by@Xewus.
  • 🌐 Fix typo in Chinese translation fordocs/zh/docs/benchmarks.md. PR#4269 by@15027668g.
  • 🌐 Add Korean translation fordocs/tutorial/cors.md. PR#3764 by@NinaHwang.

Internal

0.88.0

Upgrades

  • ⬆ Bump Starlette to version0.22.0 to fix bad encoding for query parameters in newTestClient. PR#5659 by@azogue.

Docs

  • ✏️ Fix typo in docs fordocs/en/docs/advanced/middleware.md. PR#5376 by@rifatrakib.

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/deployment/docker.md. PR#5663 by@ayr-ton.

Internal

0.87.0

Highlights of this release:

  • Upgraded Starlette
    • Now theTestClient is based on HTTPX instead of Requests. 🚀
    • There are some possiblebreaking changes in theTestClient usage, but@Kludex builtbump-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 usingbump-testclient.
  • NewWebSocketException (and docs), re-exported from Starlette.
  • Upgraded and relaxed dependencies for package extrasall (including new Uvicorn version), when you install"fastapi[all]".
  • New docs about how toHelp Maintain FastAPI.

Features

Docs

Translations

  • 🌐 Fix highlight lines for Japanese translation fordocs/tutorial/query-params.md. PR#2969 by@ftnext.
  • 🌐 Add French translation fordocs/fr/docs/advanced/additional-status-code.md. PR#5477 by@axel584.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/request-forms-and-files.md. PR#5579 by@batlopes.
  • 🌐 Add Japanese translation fordocs/ja/docs/advanced/websockets.md. PR#4983 by@xryuseix.

Internal

0.86.0

Features

Fixes

  • 🐛 Close FormData (uploaded files) after the request is done. PR#5465 by@adriangb.

Docs

Translations

  • 🌐 Update wording in Chinese translation fordocs/zh/docs/python-types.md. PR#5416 by@supercaizehua.
  • 🌐 Add Russian translation fordocs/ru/docs/deployment/index.md. PR#5336 by@Xewus.
  • 🌐 Update Chinese translation fordocs/tutorial/security/oauth2-jwt.md. PR#3846 by@jaystone776.

Internal

  • 👷 Update FastAPI People to exclude bots: pre-commit-ci, dependabot. PR#5586 by@tiangolo.
  • 🎨 Format OpenAPI JSON intest_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.2

Docs

  • ✏ Fix grammar and add helpful links to dependencies indocs/en/docs/async.md. PR#5432 by@pamelafox.
  • ✏ Fix broken link inalternatives.md. PR#5455 by@su-shubham.
  • ✏ Fix typo in docs about contributing, for compatibility withpip in Zsh. PR#5523 by@zhangbo2012.
  • 📝 Fix typo in docs with examples for Python 3.10 instead of 3.9. PR#5545 by@feliciss.

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/request-forms.md. PR#4934 by@batlopes.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/dependencies/classes-as-dependencies.md. PR#4971 by@Zssaer.
  • 🌐 Add French translation fordeployment/deta.md. PR#3692 by@rjNemo.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/query-params-str-validations.md. PR#5255 by@hjlarry.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/sql-databases.md. PR#4999 by@Zssaer.
  • 🌐 Add Chinese translation fordocs/zh/docs/advanced/wsgi.md. PR#4505 by@ASpathfinder.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/body-multiple-params.md. PR#4111 by@lbmendes.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/path-params-numeric-validations.md. PR#4099 by@lbmendes.
  • 🌐 Add French translation fordeployment/versions.md. PR#3690 by@rjNemo.
  • 🌐 Add French translation fordocs/fr/docs/help-fastapi.md. PR#2233 by@JulianMaurin.
  • 🌐 Fix typo in Chinese translation fordocs/zh/docs/tutorial/security/first-steps.md. PR#5530 by@yuki1sntSnow.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/response-status-code.md. PR#4922 by@batlopes.
  • 🔧 Add config for Tamil translations. PR#5563 by@tiangolo.

Internal

0.85.1

Fixes

  • 🐛 Fix support for strings in OpenAPI status codes:default,1XX,2XX,3XX,4XX,5XX. PR#5187 by@JarroVGIT.

Docs

  • 📝 Add WayScript x FastAPI Tutorial to External Links section. PR#5407 by@moneeka.

Internal

0.85.0

Features

  • ⬆ Upgrade version required of Starlette from0.19.1 to0.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.

Internal

  • ⬆️ 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.0

Breaking Changes

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.0

🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥

Python 3.6 reached theend-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.

Features

  • ✨ Add support injsonable_encoder for include and exclude with dataclasses. PR#4923 by@DCsunset.

Fixes

  • 🐛 FixRuntimeError raised whenHTTPException has a status code with no content. PR#5365 by@iudeen.
  • 🐛 Fix empty response body when defaultstatus_code is empty but the aResponse parameter withresponse.status_code is set. PR#5360 by@tmeckel.

Docs

Internal

0.82.0

🚨 This is probably the last release (or one of the last releases) to support Python 3.6. 🔥

Python 3.6 reached theend-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.

Features

  • ✨ ExportWebSocketState infastapi.websockets. PR#4376 by@matiuszka.
  • ✨ Support Python internal description on Pydantic model's docstring. PR#3032 by@Kludex.
  • ✨ UpdateORJSONResponse to support nonstr keys and serializing Numpy arrays. PR#3892 by@baby5.

Fixes

  • 🐛 Allow exit code for dependencies withyield 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.

Docs

  • ✏ Update Hypercorn link, now pointing to GitHub. PR#5346 by@baconfield.
  • ✏ Tweak wording indocs/en/docs/advanced/dataclasses.md. PR#3698 by@pfackeldey.
  • 📝 Add note about Python 3.10X | 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 forORJSONResponse 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.

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/features.md. PR#5315 by@Xewus.
  • 🌐 Update Chinese translation fordocs/zh/docs/tutorial/request-files.md. PR#4529 by@ASpathfinder.
  • 🌐 Add Chinese translation fordocs/zh/docs/tutorial/encoder.md. PR#4969 by@Zssaer.
  • 🌐 Fix MkDocs file line for Portuguese translation ofbackground-task.md. PR#5242 by@ComicShrimp.

Internal

0.81.0

Features

  • ✨ Add ReDoc<noscript> warning when JS is disabled. PR#5074 by@evroon.
  • ✨ Add support forFrozenSet in parameters (e.g. query). PR#2938 by@juntatalor.
  • ✨ Allow custom middlewares to raiseHTTPExceptions and propagate them. PR#2036 by@ghandic.
  • ✨ Preservejson.JSONDecodeError information when handling invalid JSON in request body, to support custom exception handlers that use its information. PR#4057 by@UKnowWhoIm.

Fixes

  • 🐛 Fixjsonable_encoder for dataclasses with pydantic-compatible fields. PR#3607 by@himbeles.
  • 🐛 Fix support for extendingopenapi_extras with parameter lists. PR#4267 by@orilevari.

Docs

  • ✏ Fix a simple typo indocs/en/docs/python-types.md. PR#5193 by@GlitchingCore.
  • ✏ Fix typos intests/test_schema_extra_examples.py. PR#5126 by@supraaxdd.
  • ✏ Fix typos indocs/en/docs/tutorial/path-params-numeric-validations.md. PR#5142 by@invisibleroads.
  • 📝 Add step about upgrading pip in the venv to avoid errors when installing dependenciesdocs/en/docs/contributing.md. PR#5181 by@edisnake.
  • ✏ Reword and clarify text in tutorialdocs/en/docs/tutorial/body-nested-models.md. PR#5169 by@papb.
  • ✏ Fix minor typo indocs/en/docs/features.md. PR#5206 by@OtherBarry.
  • ✏ Fix minor typos indocs/en/docs/async.md. PR#5125 by@Ksenofanex.
  • 📝 Add external link to docs: "Fastapi, Docker(Docker compose) and Postgres". PR#5033 by@krishnardt.
  • 📝 Simplify example for docs for Additional Responses, remove unnecessaryelse. PR#4693 by@adriangb.
  • 📝 Update docs, compare enums with identity instead of equality. PR#4905 by@MicaelJarniac.
  • ✏ Fix typo indocs/en/docs/python-types.md. PR#4886 by@MicaelJarniac.
  • 🎨 Fix syntax highlighting in docs for OpenAPI Callbacks. PR#4368 by@xncbf.
  • ✏ Reword confusing sentence in docs filetypo-fix-path-params-numeric-validations.md. PR#3219 by@ccrenfroe.
  • 📝 Update docs for handling HTTP Basic Auth withsecrets.compare_digest() to account for non-ASCII characters. PR#3536 by@lewoudar.
  • 📝 Update docs for testing, fix examples with relative imports. PR#5302 by@tiangolo.

Translations

  • 🌐 Add Russian translation fordocs/ru/docs/index.md. PR#5289 by@impocode.
  • 🌐 Add Russian translation fordocs/ru/docs/deployment/versions.md. PR#4985 by@emp7yhead.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/header-params.md. PR#4921 by@batlopes.
  • 🌐 Updateko/mkdocs.yml for a missing link. PR#5020 by@dalinaum.

Internal

  • ⬆ Bump dawidd6/action-download-artifact from 2.21.1 to 2.22.0. PR#5258 by@dependabot[bot].
  • ⬆ [pre-commit.ci] pre-commit autoupdate. PR#5196 by@pre-commit-ci[bot].
  • 🔥 Delete duplicated tests intests/test_tutorial/test_sql_databases/test_sql_databases.py. PR#5040 by@raccoonyy.
  • ♻ Simplify internal RegEx infastapi/utils.py. PR#5057 by@pylounge.
  • 🔧 Fix Type hint ofauto_error which does not need to beOptional[bool]. PR#4933 by@DavidKimDY.
  • 🔧 Update mypy config, usestrict = true instead of manual configs. PR#4605 by@michaeloliverx.
  • ♻ Change adict() for{} infastapi/utils.py. PR#3138 by@ShahriyarR.
  • ♻ Move internal variable for errors injsonable_encoder to put related code closer. PR#4560 by@GuilleQP.
  • ♻ Simplify conditional assignment infastapi/dependencies/utils.py. PR#4597 by@cikay.
  • ⬆ Upgrade version pin accepted for Flake8, for internal code, toflake8 >=3.8.3,<6.0.0. PR#4097 by@jamescurtin.
  • 🍱 Update Jina banner, fix typo. PR#5301 by@tiangolo.

0.80.0

Breaking Changes - Fixes

  • 🐛 Fixresponse_model not invalidatingNone. PR#2725 by@hukkin.

If you are usingresponse_model with some type that doesn't includeNone but the function is returningNone, it will now raise an internal server error, because you are returning invalid data that violates the contract inresponse_model. Before this release it would allow breaking that contract returningNone.

For example, if you have an app like this:

fromfastapiimportFastAPIfrompydanticimportBaseModelclassItem(BaseModel):name:strprice:Optional[float]=Noneowner_ids:Optional[List[int]]=Noneapp=FastAPI()@app.get("/items/invalidnone",response_model=Item)defget_invalid_none():returnNone

...calling the path/items/invalidnone will raise an error, becauseNone is not a valid type for theresponse_model declared withItem.

You could also be implicitly returningNone without realizing, for example:

fromfastapiimportFastAPIfrompydanticimportBaseModelclassItem(BaseModel):name:strprice:Optional[float]=Noneowner_ids:Optional[List[int]]=Noneapp=FastAPI()@app.get("/items/invalidnone",response_model=Item)defget_invalid_none():ifflag:return{"name":"foo"}# if flag is False, at this point the function will implicitly return None

If you havepath operations usingresponse_model that need to be allowed to returnNone, make it explicit inresponse_model usingUnion[Something, None]:

fromtypingimportUnionfromfastapiimportFastAPIfrompydanticimportBaseModelclassItem(BaseModel):name:strprice:Optional[float]=Noneowner_ids:Optional[List[int]]=Noneapp=FastAPI()@app.get("/items/invalidnone",response_model=Union[Item,None])defget_invalid_none():returnNone

This way the data will be correctly validated, you won't have an internal server error, and the documentation will also reflect that thispath operation could returnNone (ornull in JSON).

Fixes

  • ⬆ Upgrade Swagger UI copy ofoauth2-redirect.html to include fixes for flavors of authorization code flows in Swagger UI. PR#3439 initial PR by@koonpeng.
  • ♻ Strip empty whitespace from description extracted from docstrings. PR#2821 by@and-semakin.
  • 🐛 Fix cached dependencies when using a dependency inSecurity() and other places (e.g.Depends()) with different OAuth2 scopes. PR#2945 by@laggardkernel.
  • 🎨 Update type annotations forresponse_model, allow things likeUnion[str, None]. PR#5294 by@tiangolo.

Translations

  • 🌐 Fix typos in German translation fordocs/de/docs/features.md. PR#4533 by@0xflotus.
  • 🌐 Add missing navigator forencoder.md in Korean translation. PR#5238 by@joonas-yoon.
  • (Empty PR merge by accident)#4913.

0.79.1

Fixes

  • 🐛 Fixjsonable_encoder usinginclude andexclude parameters for non-Pydantic objects. PR#2606 by@xaviml.
  • 🐛 Fix edge case with repeated aliases names not shown in OpenAPI. PR#2351 by@klaa97.
  • 📝 Add misc dependency installs to tutorial docs. PR#2126 by@TeoZosa.

Docs

Translations

  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/query-params.md. PR#4775 by@batlopes.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/security/first-steps.md. PR#4954 by@FLAIR7.
  • 🌐 Add translation fordocs/zh/docs/advanced/response-cookies.md. PR#4638 by@zhangbo2012.
  • 🌐 Add French translation fordocs/fr/docs/deployment/index.md. PR#3689 by@rjNemo.
  • 🌐 Add Portuguese translation fortutorial/handling-errors.md. PR#4769 by@frnsimoes.
  • 🌐 Add French translation fordocs/fr/docs/history-design-future.md. PR#3451 by@rjNemo.
  • 🌐 Add Russian translation fordocs/ru/docs/tutorial/background-tasks.md. PR#4854 by@AdmiralDesu.
  • 🌐 Add Chinese translation fordocs/tutorial/security/first-steps.md. PR#3841 by@jaystone776.
  • 🌐 Add Japanese translation fordocs/ja/docs/advanced/nosql-databases.md. PR#4205 by@sUeharaE4.
  • 🌐 Add Indonesian translation fordocs/id/docs/tutorial/index.md. PR#4705 by@bas-baskara.
  • 🌐 Add Persian translation fordocs/fa/docs/index.md and tweak right-to-left CSS. PR#2395 by@mohsen-mahmoodi.

Internal

0.79.0

Fixes - Breaking Changes

  • 🐛 Fix removing body from status codes that do not support it. PR#5145 by@tiangolo.
    • Settingstatus_code to204,304, or any code below200 (1xx) will remove the body from the response.
    • This fixes an error in Uvicorn that otherwise would be thrown:RuntimeError: Response content longer than Content-Length.
    • This removesfastapi.openapi.constants.STATUS_CODES_WITH_NO_BODY, it is replaced by a function in utils.

Translations

  • 🌐 Start of Hebrew translation. PR#5050 by@itay-raveh.
  • 🔧 Add config for Swedish translations notification. PR#5147 by@tiangolo.
  • 🌐 Start of Swedish translation. PR#5062 by@MrRawbin.
  • 🌐 Add Japanese translation fordocs/ja/docs/advanced/index.md. PR#5043 by@wakabame.
  • 🌐🇵🇱 Add Polish translation fordocs/pl/docs/tutorial/first-steps.md. PR#5024 by@Valaraucoo.

Internal

0.78.0

Features

  • ✨ Add support for omitting... as default value when declaring required parameters with:

  • Path()

  • Query()
  • Header()
  • Cookie()
  • Body()
  • Form()
  • File()

New docs atTutorial - Query Parameters and String Validations - Make it required. PR#4906 by@tiangolo.

Up to now, declaring a required parameter while adding additional validation or metadata needed using... (Ellipsis).

For example:

fromfastapiimportCookie,FastAPI,Header,Path,Queryapp=FastAPI()@app.get("/items/{item_id}")defmain(item_id:int=Path(default=...,gt=0),query:str=Query(default=...,max_length=10),session:str=Cookie(default=...,min_length=3),x_trace:str=Header(default=...,title="Tracing header"),):return{"message":"Hello World"}

...all these parameters are required because the default value is... (Ellipsis).

But now it's possible and supported to just omit the default value, as would be done with Pydantic fields, and the parameters would still be required.

✨ For example, this is now supported:

fromfastapiimportCookie,FastAPI,Header,Path,Queryapp=FastAPI()@app.get("/items/{item_id}")defmain(item_id:int=Path(gt=0),query:str=Query(max_length=10),session:str=Cookie(min_length=3),x_trace:str=Header(title="Tracing header"),):return{"message":"Hello World"}

To declare parameters as optional (not required), you can set a default value as always, for example usingNone:

fromtypingimportUnionfromfastapiimportCookie,FastAPI,Header,Path,Queryapp=FastAPI()@app.get("/items/{item_id}")defmain(item_id:int=Path(gt=0),query:Union[str,None]=Query(default=None,max_length=10),session:Union[str,None]=Cookie(default=None,min_length=3),x_trace:Union[str,None]=Header(default=None,title="Tracing header"),):return{"message":"Hello World"}

Docs

  • 📝 Add docs recommendingUnion overOptional and migrate source examples. New docs atPython Types Intro - UsingUnion orOptional. PR#4908 by@tiangolo.
  • 🎨 Fix default value as set in tutorial for Path Operations Advanced Configurations. PR#4899 by@tiangolo.
  • 📝 Add documentation for redefined path operations. PR#4864 by@madkinsz.
  • 📝 Updates links for Celery documentation. PR#4736 by@sammyzord.
  • ✏ Fix example code with sets in tutorial for body nested models. PR#3030 by@hitrust.
  • ✏ Fix links to Pydantic docs. PR#4670 by@kinuax.
  • 📝 Update docs about Swagger UI self-hosting with newer source links. PR#4813 by@Kastakin.
  • 📝 Add link to external article: Building the Poll App From Django Tutorial With FastAPI And React. PR#4778 by@jbrocher.
  • 📝 Add OpenAPI warning to "Body - Fields" docs with extra schema extensions. PR#4846 by@ml-evs.

Translations

  • 🌐 Fix code examples in Japanese translation fordocs/ja/docs/tutorial/testing.md. PR#4623 by@hirotoKirimaru.

Internal

  • ♻ Refactor dict value extraction to minimize key lookupsfastapi/utils.py. PR#3139 by@ShahriyarR.
  • ✅ Add tests for required nonable parameters and body fields. PR#4907 by@tiangolo.
  • 👷 Fix installing Material for MkDocs Insiders in CI. PR#4897 by@tiangolo.
  • 👷 Add pre-commit CI instead of custom GitHub Action. PR#4896 by@tiangolo.
  • 👷 Add pre-commit GitHub Action workflow. PR#4895 by@tiangolo.
  • 📝 Add dark mode auto switch to docs based on OS preference. PR#4869 by@ComicShrimp.
  • 🔥 Remove un-used old pending tests, already covered in other places. PR#4891 by@tiangolo.
  • 🔧 Add Python formatting hooks to pre-commit. PR#4890 by@tiangolo.
  • 🔧 Add pre-commit with first config and first formatting pass. PR#4888 by@tiangolo.
  • 👷 Disable CI installing Material for MkDocs in forks. PR#4410 by@dolfinus.

0.77.1

Upgrades

  • ⬆ Upgrade Starlette from 0.19.0 to 0.19.1. PR#4819 by@Kludex.

Docs

  • 📝 Add link to german article: REST-API Programmieren mittels Python und dem FastAPI Modul. PR#4624 by@fschuermeyer.
  • 📝 Add external link: PyCharm Guide to FastAPI. PR#4512 by@mukulmantosh.
  • 📝 Add external link to article: Building an API with FastAPI and Supabase and Deploying on Deta. PR#4440 by@aUnicornDev.
  • ✏ Fix small typo indocs/en/docs/tutorial/security/first-steps.md. PR#4515 by@KikoIlievski.

Translations

Internal

  • 🔧 Add notifications in issue for Uzbek translations. PR#4884 by@tiangolo.

0.77.0

Upgrades

  • ⬆ Upgrade Starlette from 0.18.0 to 0.19.0. PR#4488 by@Kludex.
    • When creating an explicitJSONResponse thecontent argument is now required.

Docs

  • 📝 Add external link to article: Seamless FastAPI Configuration with ConfZ. PR#4414 by@silvanmelchior.
  • 📝 Add external link to article: 5 Advanced Features of FastAPI You Should Try. PR#4436 by@kaustubhgupta.
  • ✏ Reword to improve legibility of docs aboutTestClient. PR#4389 by@rgilton.
  • 📝 Add external link to blog post about Kafka, FastAPI, and Ably. PR#4044 by@Ugbot.
  • ✏ Fix typo indocs/en/docs/tutorial/sql-databases.md. PR#4875 by@wpyoga.
  • ✏ Fix typo indocs/en/docs/async.md. PR#4726 by@Prezu.

Translations

  • 🌐 Update source example highlights fordocs/zh/docs/tutorial/query-params-str-validations.md. PR#4237 by@caimaoy.
  • 🌐 Remove translation docs references to aiofiles as it's no longer needed since AnyIO. PR#3594 by@alonme.
  • ✏ 🌐 Fix typo in Portuguese translation fordocs/pt/docs/tutorial/path-params.md. PR#4722 by@CleoMenezesJr.
  • 🌐 Fix live docs server for translations for some languages. PR#4729 by@wakabame.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/cookie-params.md. PR#4112 by@lbmendes.
  • 🌐 Fix French translation fordocs/tutorial/body.md. PR#4332 by@Smlep.
  • 🌐 Add Japanese translation fordocs/ja/docs/advanced/conditional-openapi.md. PR#2631 by@sh0nk.
  • 🌐 Fix Japanese translation ofdocs/ja/docs/tutorial/body.md. PR#3062 by@a-takahashi223.
  • 🌐 Add Portuguese translation fordocs/pt/docs/tutorial/background-tasks.md. PR#2170 by@izaguerreiro.
  • 🌐 Add Portuguese translation fordocs/deployment/deta.md. PR#4442 by@lsglucas.
  • 🌐 Add Russian translation fordocs/async.md. PR#4036 by@Winand.
  • 🌐 Add Portuguese translation fordocs/tutorial/body.md. PR#3960 by@leandrodesouzadev.
  • 🌐 Add Portuguese translation oftutorial/extra-data-types.md. PR#4077 by@luccasmmg.
  • 🌐 Update German translation fordocs/features.md. PR#3905 by@jomue.

0.76.0

Upgrades

  • ⬆ Upgrade Starlette from 0.17.1 to 0.18.0. PR#4483 by@Kludex.

Internal

0.75.2

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.

Fixes

  • ✅ Fix new/recent tests with new fixedValidationError JSON Schema. PR#4806 by@tiangolo.
  • 🐛 Fix JSON Schema forValidationError at fieldloc. PR#3810 by@dconathan.
  • 🐛 Fix support for prefix on APIRouter WebSockets. PR#2640 by@Kludex.

Upgrades

  • ⬆️ Update ujson ranges for CVE-2021-45958. PR#4804 by@tiangolo.
  • ⬆️ Upgrade dependencies upper range for extras "all". PR#4803 by@tiangolo.
  • ⬆ Upgrade Swagger UI - swagger-ui-dist@4. This handles a security issue in Swagger UI itself where it could be possible to inject HTML into Swagger UI. Please upgrade as soon as you can, in particular if you expose your Swagger UI (/docs) publicly to non-expert users. PR#4347 by@RAlanWright.

Internal

  • 🔧 Update sponsors, add: ExoFlare, Ines Course; remove: Dropbase, Vim.so, Calmcode; update: Striveworks, TalkPython and TestDriven.io. PR#4805 by@tiangolo.
  • ⬆️ Upgrade Codecov GitHub Action. PR#4801 by@tiangolo.

0.75.1

Translations

Internal

0.75.0

Features

0.74.1

Features

  • ✨ Include route in scope to allow middleware and other tools to extract its information. PR#4603 by@tiangolo.

0.74.0

Breaking Changes

  • ✨ Update internalAsyncExitStack to fix context for dependencies withyield. PR#4575 by@tiangolo.

Dependencies withyield can now catchHTTPException and custom exceptions. For example:

asyncdefget_database():withSession()assession:try:yieldsessionexceptHTTPException:session.rollback()raisefinally:session.close()

After the dependency withyield handles the exception (or not) the exception is raised again. So that any exception handlers can catch it, or ultimately the default internalServerErrorMiddleware.

If you depended on exceptions not being received by dependencies withyield, and receiving an exception breaks the code afteryield, you can use a block withtry andfinally:

asyncdefdo_something():try:yieldsomethingfinally:some_cleanup()

...that way thefinally block is run regardless of any exception that might happen.

Features

  • The same PR#4575 from above also fixes thecontextvars context for the code before and afteryield. This was the main objective of that PR.

This means that now, if you set a value in a context variable beforeyield, the value would still be available afteryield (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:

fromcontextvarsimportContextVarfromtypingimportAny,Dict,Optionallegacy_request_state_context_var:ContextVar[Optional[Dict[str,Any]]]=ContextVar("legacy_request_state_context_var",default=None)asyncdefset_up_request_state_dependency():request_state={"user":"deadpond"}contextvar_token=legacy_request_state_context_var.set(request_state)yieldrequest_statelegacy_request_state_context_var.reset(contextvar_token)

...before this change it would raise an error when resetting the context variable, because thecontextvars context was different, because of the way it was implemented.

Note: You probably don't needcontextvars, 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'sg semi-global variable.

Technical Details: If you want to know more of the technical details you can check out the PR description#4575.

Internal

0.73.0

Features

Docs

Fixes

Internal

  • 🐛 Fix docs dependencies cache, to get the latest Material for MkDocs. PR#4466 by@tiangolo.
  • 🔧 Add sponsor Dropbase. PR#4465 by@tiangolo.

0.72.0

Features

Docs

  • 📝 Update Python Types docs, add missing 3.6 / 3.9 example. PR#4434 by@tiangolo.

Translations

  • 🌐 Update Chinese translation fordocs/help-fastapi.md. PR#3847 by@jaystone776.
  • 🌐 Fix Korean translation fordocs/ko/docs/index.md. PR#4195 by@kty4119.
  • 🌐 Add Polish translation fordocs/pl/docs/index.md. PR#4245 by@MicroPanda123.
  • 🌐 Add Chinese translation fordocs\tutorial\path-operation-configuration.md. PR#3312 by@jaystone776.

Internal

  • 🔧 Enable MkDocs Material Insiders'content.tabs.link. PR#4399 by@tiangolo.

0.71.0

Features

  • ✨ Add docs and tests for Python 3.9 and Python 3.10. PR#3712 by@tiangolo.
    • You can start withPython Types Intro, it explains what changes between different Python versions, in Python 3.9 and in Python 3.10.
    • All the FastAPI docs are updated. Each code example in the docs that could use different syntax in Python 3.9 or Python 3.10 now has all the alternatives in tabs.
  • ⬆️ Upgrade Starlette to 0.17.1. PR#4145 by@simondale00.

Internal

0.70.1

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. 🤩

Fixes

  • 🐛 Fix JSON Schema for dataclasses, supporting the fixes in Pydantic 1.9. PR#4272 by@PrettyWood.

Translations

  • 🌐 Add Korean translation fordocs/tutorial/request-forms-and-files.md. PR#3744 by@NinaHwang.
  • 🌐 Add Korean translation fordocs/tutorial/request-files.md. PR#3743 by@NinaHwang.
  • 🌐 Add portuguese translation fordocs/tutorial/query-params-str-validations.md. PR#3965 by@leandrodesouzadev.
  • 🌐 Add Korean translation fordocs/tutorial/response-status-code.md. PR#3742 by@NinaHwang.
  • 🌐 Add Korean translation for Tutorial - JSON Compatible Encoder. PR#3152 by@NEONKID.
  • 🌐 Add Korean translation for Tutorial - Path Parameters and Numeric Validations. PR#2432 by@hard-coders.
  • 🌐 Add Korean translation fordocs/ko/docs/deployment/versions.md. PR#4121 by@DevDae.
  • 🌐 Fix Korean translation fordocs/ko/docs/tutorial/index.md. PR#4193 by@kimjaeyoonn.
  • 🔧 Add CryptAPI sponsor. PR#4264 by@tiangolo.
  • 📝 Updatedocs/tutorial/dependencies/classes-as-dependencies: Add type of query parameters in a description ofClasses as dependencies. PR#4015 by@0417taehyun.
  • 🌐 Add French translation for Tutorial - First steps. PR#3455 by@Smlep.
  • 🌐 Add French translation fordocs/tutorial/path-params.md. PR#3548 by@Smlep.
  • 🌐 Add French translation fordocs/tutorial/query-params.md. PR#3556 by@Smlep.
  • 🌐 Add Turkish translation fordocs/python-types.md. PR#3926 by@BilalAlpaslan.

Internal

0.70.0

This release just upgrades Starlette to the latest version,0.16.0, which includes several bug fixes and some small breaking changes.

These lastthree consecutive releases are independent so that you canmigrate gradually:

  • First to FastAPI0.68.2, with no breaking changes, but upgrading all the sub-dependencies.
  • Next to FastAPI0.69.0, which upgrades Starlette to0.15.0, with AnyIO support, and a higher chance of having breaking changes in your code.
  • Finally to FastAPI0.70.0, just upgrading Starlette to the latest version0.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. ✨

Breaking Changes - Upgrade

Also upgrades the ranges of optional dependencies:

  • "jinja2 >=2.11.2,<4.0.0"
  • "itsdangerous >=1.1.0,<3.0.0"

0.69.0

Breaking Changes - Upgrade

This release adds support forTrio. ✨

It upgrades the version of Starlette to0.15.0, now based onAnyIO, and the internal async components inFastAPI are now based on AnyIO as well, making it compatible with bothasyncio andTrio.

You can read the docs about runningFastAPI with Trio using Hypercorn.

This release also removesgraphene as an optional dependency for GraphQL. If you need to work with GraphQL, the recommended library now isStrawberry. You can read the newFastAPI with GraphQL docs.

Features

  • ✨ Add support for Trio via AnyIO, upgrading Starlette to0.15.0. PR#3372 by@graingert.
  • ➖ Removegraphene as an optional dependency. PR#4007 by@tiangolo.

Docs

  • 📝 Add docs for using Trio with Hypercorn. PR#4014 by@tiangolo.
  • ✏ Fix typos in Deployment Guide. PR#3975 by@ghandic.
  • 📝 Update docs with pip install calls when using extras with brackets, use quotes for compatibility with Zsh. PR#3131 by@tomwei7.
  • 📝 Add external link to article: Deploying ML Models as API Using FastAPI and Heroku. PR#3904 by@kaustubhgupta.
  • ✏ Fix typo in file paths indocs/en/docs/contributing.md. PR#3752 by@NinaHwang.
  • ✏ Fix a typo indocs/en/docs/advanced/path-operation-advanced-configuration.md anddocs/en/docs/release-notes.md. PR#3750 by@saintmalik.
  • ✏️ Add a missing comma in the security tutorial. PR#3564 by@jalvaradosegura.
  • ✏ Fix typo indocs/en/docs/help-fastapi.md. PR#3760 by@jaystone776.
  • ✏ Fix typo about file path indocs/en/docs/tutorial/bigger-applications.md. PR#3285 by@HolyDorus.
  • ✏ Re-word to clarify test client indocs/en/docs/tutorial/testing.md. PR#3382 by@Bharat123rox.
  • 📝 Fix incorrect highlighted code. PR#3325 by@paxcodes.
  • 📝 Add external link to article: How-to deploy FastAPI app to Heroku. PR#3241 by@Jarmos-san.
  • ✏ Fix typo (mistranslation) indocs/en/docs/advanced/templates.md. PR#3211 by@oerpli.
  • 📝 Remove note about (now supported) feature from Swagger UI indocs/en/docs/tutorial/request-files.md. PR#2803 by@gsganden.
  • ✏ Fix typo re-word indocs/tutorial/handling-errors.md. PR#2700 by@graue70.

Translations

Internal

  • 📝 Add supported Python versions badge. PR#2794 by@hramezani.
  • ✏ Fix link in Japanese docs fordocs/ja/docs/deployment/docker.md. PR#3245 by@utamori.
  • 🔧 Correct DeprecationWarning config and comment in pytest settings. PR#4008 by@graingert.
  • 🔧 Swap light/dark theme button icon. PR#3246 by@eddsalkield.
  • 🔧 Lint only in Python 3.7 and above. PR#4006 by@tiangolo.
  • 🔧 Add GitHub Action notify-translations config for Azerbaijani. PR#3995 by@tiangolo.

0.68.2

This release hasno 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.

Features

  • ⬆Increase supported version of aiofiles to suppress warnings. PR#2899 by@SnkSynthesis.
  • ➖ Do not require backports in Python >= 3.7. PR#1880 by@FFY00.
  • ⬆ Upgrade required Python version to >= 3.6.1, needed by typing.Deque, used by Pydantic. PR#2733 by@hukkin.
  • ⬆️ Bump Uvicorn max range to 0.15.0. PR#3345 by@Kludex.

Docs

  • 📝 Update GraphQL docs, recommend Strawberry. PR#3981 by@tiangolo.
  • 📝 Re-write and extend Deployment guide: Concepts, Uvicorn, Gunicorn, Docker, Containers, Kubernetes. PR#3974 by@tiangolo.
  • 📝 Upgrade HTTPS guide with more explanations and diagrams. PR#3950 by@tiangolo.

Translations

  • 🌐 Add Turkish translation fordocs/features.md. PR#1950 by@ycd.
  • 🌐 Add Turkish translation fordocs/benchmarks.md. PR#2729 by@Telomeraz.
  • 🌐 Add Turkish translation fordocs/index.md. PR#1908 by@ycd.
  • 🌐 Add French translation fordocs/tutorial/body.md. PR#3671 by@Smlep.
  • 🌐 Add French translation fordeployment/docker.md. PR#3694 by@rjNemo.
  • 🌐 Add Portuguese translation fordocs/tutorial/path-params.md. PR#3664 by@FelipeSilva93.
  • 🌐 Add Portuguese translation fordocs/deployment/https.md. PR#3754 by@lsglucas.
  • 🌐 Add German translation fordocs/features.md. PR#3699 by@mawassk.

Internal

  • ✨ Update GitHub Action: notify-translations, to avoid a race conditions. PR#3989 by@tiangolo.
  • ⬆️ Upgrade developmentautoflake, supporting multi-line imports. PR#3988 by@tiangolo.
  • ⬆️ Increase dependency ranges for tests and docs: pytest-cov, pytest-asyncio, black, httpx, sqlalchemy, databases, mkdocs-markdownextradata-plugin. PR#3987 by@tiangolo.
  • 👥 Update FastAPI People. PR#3986 by@github-actions[bot].
  • 💚 Fix badges in README and main page. PR#3979 by@ghandic.
  • ⬆ Upgrade internal testing dependencies: mypy to version 0.910, add newly needed type packages. PR#3350 by@ArcLightSlavik.
  • ✨ Add Deepset Sponsorship. PR#3976 by@tiangolo.
  • 🎨 Tweak CSS styles for shell animations. PR#3888 by@tiangolo.
  • 🔧 Add new Sponsor Calmcode.io. PR#3777 by@tiangolo.

0.68.1

Translations

  • 🌐 Add Portuguese translation ofdocs/fastapi-people.md. PR#3461 by@ComicShrimp.
  • 🌐 Add Chinese translation fordocs/tutorial/dependencies/dependencies-in-path-operation-decorators.md. PR#3492 by@jaystone776.
  • 🔧 Add new Translation tracking issues for German and Indonesian. PR#3718 by@tiangolo.
  • 🌐 Add Chinese translation fordocs/tutorial/dependencies/sub-dependencies.md. PR#3491 by@jaystone776.
  • 🌐 Add Portuguese translation fordocs/advanced/index.md. PR#3460 by@ComicShrimp.
  • 🌐 Portuguese translation ofdocs/async.md. PR#1330 by@Serrones.
  • 🌐 Add French translation fordocs/async.md. PR#3416 by@Smlep.

Internal

0.68.0

Features

Docs

  • 📝 Update docs about async and response-model with more gender neutral language. PR#1869 by@Edward-Knight.

Translations

  • 🌐 Add Russian translation fordocs/python-types.md. PR#3039 by@dukkee.
  • 🌐 Add Chinese translation fordocs/tutorial/dependencies/index.md. PR#3489 by@jaystone776.
  • 🌐 Add Russian translation fordocs/external-links.md. PR#3036 by@dukkee.
  • 🌐 Add Chinese translation fordocs/tutorial/dependencies/global-dependencies.md. PR#3493 by@jaystone776.
  • 🌐 Add Portuguese translation fordocs/deployment/versions.md. PR#3618 by@lsglucas.
  • 🌐 Add Japanese translation fordocs/tutorial/security/oauth2-jwt.md. PR#3526 by@sattosan.

Internal

  • ✅ Add thedocs_src directory to test coverage and update tests. Initial PR#1904 by@Kludex.
  • 🔧 Add new GitHub templates with forms for new issues. PR#3612 by@tiangolo.
  • 📝 Add official FastAPI Twitter to docs:@fastapi. PR#3578 by@tiangolo.

0.67.0

Features

Docs

  • 📝 Add external link: How to Create A Fake Certificate Authority And Generate TLS Certs for FastAPI. PR#2839 by@aitoehigie.
  • ✏ Fix code highlighted line in:body-nested-models.md. PR#3463 by@jaystone776.
  • ✏ Fix typo inbody-nested-models.md. PR#3462 by@jaystone776.
  • ✏ Fix typo "might me" -> "might be" indocs/en/docs/tutorial/schema-extra-example.md. PR#3362 by@dbrakman.
  • 📝 Add external link: Building simple E-Commerce with NuxtJS and FastAPI. PR#3271 by@ShahriyarR.
  • 📝 Add external link: Serve a machine learning model using Sklearn, FastAPI and Docker. PR#2974 by@rodrigo-arenas.
  • ✏️ Fix typo on docstring in datastructures file. PR#2887 by@Kludex.
  • 📝 Add External Link: Deploy FastAPI on Ubuntu and Serve using Caddy 2 Web Server. PR#3572 by@tiangolo.
  • 📝 Add External Link, replaces #1898. PR#3571 by@tiangolo.

Internal

  • 🎨 Improve style for sponsors, add radius border. PR#2388 by@Kludex.
  • 👷 Update GitHub Action latest-changes. PR#3574 by@tiangolo.
  • 👷 Update GitHub Action latest-changes. PR#3573 by@tiangolo.
  • 👷 Rename and clarify CI workflow job names. PR#3570 by@tiangolo.
  • 👷 Update GitHub Action latest-changes, strike 2 ⚾. PR#3575 by@tiangolo.
  • 🔧 Sort external links in docs to have the most recent at the top. PR#3568 by@tiangolo.

0.66.1

Translations

Internal

  • 🔧 Configure strict pytest options and update/refactor tests. Upgrade pytest to>=6.2.4,<7.0.0 and pytest-cov to>=2.12.0,<3.0.0. Initial PR#2790 by@graingert.
  • ⬆️ Upgrade python-jose dependency to>=3.3.0,<4.0.0 for tests. PR#3468 by@tiangolo.

0.66.0

Features

  • ✨ Allow setting theresponse_class toRedirectResponse orFileResponse and returning the URL from the function. New and updated docs are in the tutorial sectionCustom Response - HTML, Stream, File, others, inRedirectResponse and inFileResponse. PR#3457 by@tiangolo.

Fixes

  • 🐛 Fix include/exclude for dicts injsonable_encoder. PR#2016 by@Rubikoid.
  • 🐛 Support custom OpenAPI / JSON Schema fields in the generated output OpenAPI. PR#1429 by@jmagnusson.

Translations

  • 🌐 Add Spanish translation fortutorial/query-params.md. PR#2243 by@mariacamilagl.
  • 🌐 Add Spanish translation foradvanced/response-directly.md. PR#1253 by@jfunez.
  • 🌐 Add Spanish translation foradvanced/additional-status-codes.md. PR#1252 by@jfunez.
  • 🌐 Add Spanish translation foradvanced/path-operation-advanced-configuration.md. PR#1251 by@jfunez.

0.65.3

Fixes

  • ♻ Assume request bodies contain JSON when no Content-Type header is provided. This fixes a breaking change introduced by0.65.2 with PR #2118. It should allow upgrading FastAPI applications with clients that send JSON data without aContent-Type header. And there's still protection against CSRFs. PR#3456 by@tiangolo.

Translations

  • 🌐 Initialize Indonesian translations. PR#3014 by@pace-noge.
  • 🌐 Add Spanish translation of Tutorial - Path Parameters. PR#2219 by@mariacamilagl.
  • 🌐 Add Spanish translation of Tutorial - First Steps. PR#2208 by@mariacamilagl.
  • 🌐 Portuguese translation of Tutorial - Body - Fields. PR#3420 by@ComicShrimp.
  • 🌐 Add Chinese translation for Tutorial - Request - Forms - and - Files. PR#3249 by@jaystone776.
  • 🌐 Add Chinese translation for Tutorial - Handling - Errors. PR#3299 by@jaystone776.
  • 🌐 Add Chinese translation for Tutorial - Form - Data. PR#3248 by@jaystone776.
  • 🌐 Add Chinese translation for Tutorial - Body - Updates. PR#3237 by@jaystone776.
  • 🌐 Add Chinese translation for FastAPI People. PR#3112 by@hareru.
  • 🌐 Add French translation for Project Generation. PR#3197 by@Smlep.
  • 🌐 Add French translation for Python Types Intro. PR#3185 by@Smlep.
  • 🌐 Add French translation for External Links. PR#3103 by@Smlep.
  • 🌐 Add French translation for Alternatives, Inspiration and Comparisons. PR#3020 by@rjNemo.
  • 🌐 Fix Chinese translation code snippet mismatch in Tutorial - Python Types Intro. PR#2573 by@BoYanZh.
  • 🌐 Add Portuguese translation for Development Contributing. PR#1364 by@Serrones.
  • 🌐 Add Chinese translation for Tutorial - Request - Files. PR#3244 by@jaystone776.

Internal

0.65.2

Security fixes

  • 🔒 Check Content-Type request header before assuming JSON. Initial PR#2118 by@patrickkwang.

This change fixes aCSRF security vulnerability when using cookies for authentication in path operations with JSON payloads sent by browsers.

In versions lower than0.65.2, FastAPI would try to read the request payload as JSON even if thecontent-type header sent was not set toapplication/json or a compatible JSON media type (e.g.application/geo+json).

So, a request with a content type oftext/plain containing JSON data would be accepted and the JSON data would be extracted.

But requests with content typetext/plain are exempt fromCORS preflights, for being consideredSimple 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.

SeeCVE-2021-32677 for more details.

Thanks toDima Boger for the security report! 🙇🔒

Internal

0.65.1

Security fixes

0.65.0

Breaking Changes - Upgrade

  • ⬆️ Upgrade Starlette to0.14.2, including internalUJSONResponse migrated from Starlette. This includes several bug fixes and features from Starlette. PR#2335 by@hanneskuettner.

Translations

Internal

0.64.0

Features

Fixes

  • 📌 Pin SQLAlchemy range for tests, as it doesn't use SemVer. PR#3001 by@tiangolo.
  • 🎨 Add newly required type annotations for mypy. PR#2882 by@tiangolo.
  • 🎨 Remove internal "type: ignore", now unnecessary. PR#2424 by@AsakuraMizu.

Docs

  • 📝 Add link to article in Russian "FastAPI: знакомимся с фреймворком". PR#2564 by@trkohler.
  • 📝 Add external link to blog post "Authenticate Your FastAPI App with Auth0". PR#2172 by@dompatmore.
  • 📝 Fix broken link to article: Machine learning model serving in Python using FastAPI and Streamlit. PR#2557 by@davidefiocco.
  • 📝 Add FastAPI Medium Article: Deploy a dockerized FastAPI application to AWS. PR#2515 by@vjanz.
  • ✏ Fix typo in Tutorial - Handling Errors. PR#2486 by@johnthagen.
  • ✏ Fix typo in Security OAuth2 scopes. PR#2407 by@jugmac00.
  • ✏ Fix typo/clarify docs for SQL (Relational) Databases. PR#2393 by@kangni.
  • 📝 Add external link to "FastAPI for Flask Users". PR#2280 by@amitness.

Translations

  • 🌐 Fix Chinese translation of Tutorial - Query Parameters, remove obsolete content. PR#3051 by@louis70109.
  • 🌐 Add French translation for Tutorial - Background Tasks. PR#3098 by@Smlep.
  • 🌐 Fix Korean translation for docs/ko/docs/index.md. PR#3159 by@SueNaEunYang.
  • 🌐 Add Korean translation for Tutorial - Query Parameters. PR#2390 by@hard-coders.
  • 🌐 Add French translation for FastAPI People. PR#2232 by@JulianMaurin.
  • 🌐 Add Korean translation for Tutorial - Path Parameters. PR#2355 by@hard-coders.
  • 🌐 Add French translation for Features. PR#2157 by@Jefidev.
  • 👥 Update FastAPI People. PR#3031 by@github-actions[bot].
  • 🌐 Add Chinese translation for Tutorial - Debugging. PR#2737 by@blt232018.
  • 🌐 Add Chinese translation for Tutorial - Security - OAuth2 with Password (and hashing), Bearer with JWT tokens. PR#2642 by@waynerv.
  • 🌐 Add Korean translation for Tutorial - Header Parameters. PR#2589 by@mode9.
  • 🌐 Add Chinese translation for Tutorial - Metadata and Docs URLs. PR#2559 by@blt232018.
  • 🌐 Add Korean translation for Tutorial - First Steps. PR#2323 by@hard-coders.
  • 🌐 Add Chinese translation for Tutorial - CORS (Cross-Origin Resource Sharing). PR#2540 by@blt232018.
  • 🌐 Add Chinese translation for Tutorial - Middleware. PR#2334 by@lpdswing.
  • 🌐 Add Korean translation for Tutorial - Intro. PR#2317 by@hard-coders.
  • 🌐 Add Chinese translation for Tutorial - Bigger Applications - Multiple Files. PR#2453 by@waynerv.
  • 🌐 Add Chinese translation for Tutorial - Security - Security Intro. PR#2443 by@waynerv.
  • 🌐 Add Chinese translation for Tutorial - Header Parameters. PR#2412 by@maoyibo.
  • 🌐 Add Chinese translation for Tutorial - Extra Data Types. PR#2410 by@maoyibo.
  • 🌐 Add Japanese translation for Deployment - Docker. PR#2312 by@tokusumi.
  • 🌐 Add Japanese translation for Deployment - Versions. PR#2310 by@tokusumi.
  • 🌐 Add Chinese translation for Tutorial - Cookie Parameters. PR#2261 by@alicrazy1947.
  • 🌐 Add Japanese translation for Tutorial - Static files. PR#2260 by@tokusumi.
  • 🌐 Add Japanese translation for Tutorial - Testing. PR#2259 by@tokusumi.
  • 🌐 Add Japanese translation for Tutorial - Debugging. PR#2256 by@tokusumi.
  • 🌐 Add Japanese translation for Tutorial - Middleware. PR#2255 by@tokusumi.
  • 🌐 Add Japanese translation for Concurrency and async / await. PR#2058 by@tokusumi.
  • 🌐 Add Chinese translation for Tutorial - Security - Simple OAuth2 with Password and Bearer. PR#2514 by@waynerv.
  • 🌐 Add Japanese translation for Deployment - Deta. PR#2314 by@tokusumi.
  • 🌐 Add Chinese translation for Tutorial - Security - Get Current User. PR#2474 by@waynerv.
  • 🌐 Add Japanese translation for Deployment - Manually. PR#2313 by@tokusumi.
  • 🌐 Add Japanese translation for Deployment - Intro. PR#2309 by@tokusumi.
  • 🌐 Add Japanese translation for FastAPI People. PR#2254 by@tokusumi.
  • 🌐 Add Japanese translation for Advanced - Path Operation Advanced Configuration. PR#2124 by@Attsun1031.
  • 🌐 Add Japanese translation for External Links. PR#2070 by@tokusumi.
  • 🌐 Add Japanese translation for Tutorial - Body - Updates. PR#1956 by@SwftAlpc.
  • 🌐 Add Japanese translation for Tutorial - Form Data. PR#1943 by@SwftAlpc.
  • 🌐 Add Japanese translation for Tutorial - Cookie Parameters. PR#1933 by@SwftAlpc.

Internal

0.63.0

Features

  • ✨ Improve type annotations, add support for mypy --strict, internally and for external packages. PR#2547 by@tiangolo.

Breaking changes

  • ⬆️ Upgrade Uvicorn when installingfastapi[all] to the latest version includinguvloop, the new range isuvicorn[standard] >=0.12.0,<0.14.0. PR#2548 by@tiangolo.

Fixes

  • 🐛 PR#2547 (read above) also fixes some false-positive mypy errors withcallbacks parameters and when using theOAuth2 class.

Docs

Translations

  • 🌐 Add docs lang selector widget. PR#2542 by@tiangolo.
  • 🌐 Add Chinese translation for Tutorial - Response Status Code. PR#2442 by@waynerv.
  • 🌐 Start translation of the documentation for the Albanian language. PR#2516 by@vjanz.
  • 🌐 Add Chinese translation for Tutorial - Extra Models. PR#2416 by@waynerv.
  • 🌐 Add Chinese translation for Tutorial - Response Model. PR#2414 by@waynerv.
  • 🌐 Add Chinese translation for Tutorial - Schema Extra Example. PR#2411 by@maoyibo.
  • 🌐 Add Korean translation for Index. PR#2192 by@hard-coders.
  • 🌐 Add Japanese translation for Advanced User Guide - Additional Status Codes. PR#2145 by@Attsun1031.

Internal

  • 🐛 Fix docs overrides directory for translations. PR#2541 by@tiangolo.
  • ➖ Remove Typer as a docs building dependency (covered by typer-cli) to fix pip resolver conflicts. PR#2539 by@tiangolo.
  • ✨ Add newsletter: FastAPI and friends. PR#2509 by@tiangolo.
  • ✨ Add new Gold Sponsor: InvestSuite 🎉. PR#2508 by@tiangolo.
  • 🔧 Add issue template configs. PR#2476 by@tiangolo.

0.62.0

Features

  • ✨ Add support for shared/top-level parameters (dependencies, tags, etc). PR#2434 by@tiangolo.

Up to now, for several options, the only way to apply them to a group ofpath operations was ininclude_router. That works well, but the call toapp.include_router() orrouter.include_router() is normally done in another file.

That means that, for example, to apply authentication to all thepath operations in a router it would end up being done in a different file, instead of keeping related logic together.

Setting options ininclude_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 theAPIRouter.

InFastAPI

This allows setting the (mostly new) parameters (additionally to the already existing parameters):

  • default_response_class: updated to handle defaults inAPIRouter andinclude_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 thepath operations.
  • deprecated: to mark all thepath operations as deprecated. 🤷
  • include_in_schema: to allow excluding all thepath operations from the OpenAPI schema.
  • responses: OpenAPI responses that apply to all thepath operations.

For example:

fromfastapiimportFastAPI,Dependsasyncdefsome_dependency():returnapp=FastAPI(dependencies=[Depends(some_dependency)])

InAPIRouter

This allows setting the (mostly new) parameters (additionally to the already existing parameters):

  • default_response_class: updated to handle defaults inAPIRouter andinclude_router. For example, it's not needed to set it explicitly whencreating callbacks.
  • dependencies: to include ✨ router-level dependencies ✨ that apply to all thepath operations in a router. Up to now, this was only possible withinclude_router.
  • callbacks: OpenAPI callbacks that apply to all thepath operations in this router.
  • deprecated: to mark all thepath operations in a router as deprecated.
  • include_in_schema: to allow excluding all thepath operations in a router from the OpenAPI schema.
  • responses: OpenAPI responses that apply to all thepath operations in a router.
  • prefix: to set the path prefix for a router. Up to now, this was only possible when callinginclude_router.
  • tags: OpenAPI tags to apply to all thepath operations in this router.

For example:

fromfastapiimportAPIRouter,Dependsasyncdefsome_dependency():returnrouter=APIRouter(prefix="/users",dependencies=[Depends(some_dependency)])

Ininclude_router

Most of these settings are now supported inAPIRouter, which normally lives closer to the related code, so it is recommended to useAPIRouter when possible.

Butinclude_router is still useful to, for example, adding options (likedependencies,prefix, andtags) 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 inAPIRouter andFastAPI.
  • deprecated: to mark all thepath operations in a router as deprecated in OpenAPI.
  • include_in_schema: to allow disabling all thepath operations from showing in the OpenAPI schema.
  • callbacks: OpenAPI callbacks that apply to all thepath operations in this router.

Note: all the previous parameters are still there, so it's still possible to declaredependencies ininclude_router.

Breaking Changes

  • PR#2434 includes several improvements that shouldn't affect normal use cases, but could affect in advanced scenarios:
    • If you are testing the generated OpenAPI (you shouldn't, FastAPI already tests it extensively for you): the order fortags ininclude_router andpath operations was updated for consistency, but it's a simple order change.
    • If you have advanced custom logic to access each route'sroute.response_class, or therouter.default_response_class, or theapp.default_response_class: the default value forresponse_class inAPIRoute and fordefault_response_class inAPIRouter andFastAPI is now aDefaultPlaceholder used internally to handle and solve default values and overrides. The actual response class inside theDefaultPlaceholder is available atroute.response_class.value.

Docs

Translations

  • 🌐 Add Japanese translation for Advanced - Custom Response. PR#2193 by@Attsun1031.
  • 🌐 Add Chinese translation for Benchmarks. PR#2119 by@spaceack.
  • 🌐 Add Chinese translation for Tutorial - Body - Nested Models. PR#1609 by@waynerv.
  • 🌐 Add Chinese translation for Advanced - Custom Response. PR#1459 by@RunningIkkyu.
  • 🌐 Add Chinese translation for Advanced - Return a Response Directly. PR#1452 by@RunningIkkyu.
  • 🌐 Add Chinese translation for Advanced - Additional Status Codes. PR#1451 by@RunningIkkyu.
  • 🌐 Add Chinese translation for Advanced - Path Operation Advanced Configuration. PR#1447 by@RunningIkkyu.
  • 🌐 Add Chinese translation for Advanced User Guide - Intro. PR#1445 by@RunningIkkyu.

Internal

  • 🔧 Update TestDriven link to course in sponsors section. PR#2435 by@tiangolo.
  • 🍱 Update sponsor logos. PR#2418 by@tiangolo.
  • 💚 Fix disabling install of Material for MkDocs Insiders in forks, strike 1 ⚾. PR#2340 by@tiangolo.
  • 🐛 Fix disabling Material for MkDocs Insiders install in forks. PR#2339 by@tiangolo.
  • ✨ Add silver sponsor WeTransfer. PR#2338 by@tiangolo.
  • ✨ Set up and enable Material for MkDocs Insiders for the docs. PR#2325 by@tiangolo.

0.61.2

Fixes

  • 📌 Relax Swagger UI version pin. PR#2089 by@jmriebold.
  • 🐛 Fix bug overriding custom HTTPException and RequestValidationError from exception_handlers. PR#1924 by@uriyyo.
  • ✏️ Fix typo on dependencies utils and cleanup unused variable. PR#1912 by@Kludex.

Docs

Translations

  • 🌐 Add Japanese translation for Advanced Tutorial - Response Directly. PR#2191 by@Attsun1031.
  • 📝 Add Japanese translation for Tutorial - Security - First Steps. PR#2153 by@komtaki.
  • 🌐 Add Japanese translation for Tutorial - Query Parameters and String Validations. PR#1901 by@SwftAlpc.
  • 🌐 Add Portuguese translation for External Links. PR#1443 by@Serrones.
  • 🌐 Add Japanese translation for Tutorial - CORS. PR#2125 by@tokusumi.
  • 🌐 Add Japanese translation for Contributing. PR#2067 by@komtaki.
  • 🌐 Add Japanese translation for Project Generation. PR#2050 by@tokusumi.
  • 🌐 Add Japanese translation for Alternatives. PR#2043 by@Attsun1031.
  • 🌐 Add Japanese translation for History Design and Future. PR#2002 by@komtaki.
  • 🌐 Add Japanese translation for Benchmarks. PR#1992 by@komtaki.
  • 🌐 Add Japanese translation for Tutorial - Header Parameters. PR#1935 by@SwftAlpc.
  • 🌐 Add Portuguese translation for Tutorial - First Steps. PR#1861 by@jessicapaz.
  • 🌐 Add Portuguese translation for Python Types. PR#1796 by@izaguerreiro.
  • 🌐 Add Japanese translation for Help FastAPI. PR#1692 by@tokusumi.
  • 🌐 Add Japanese translation for Tutorial - Body. PR#1683 by@tokusumi.
  • 🌐 Add Japanese translation for Tutorial - Query Params. PR#1674 by@tokusumi.
  • 🌐 Add Japanese translation for tutorial/path-params.md. PR#1671 by@tokusumi.
  • 🌐 Add Japanese translation for tutorial/first-steps.md. PR#1658 by@tokusumi.
  • 🌐 Add Japanese translation for tutorial/index.md. PR#1656 by@tokusumi.
  • 🌐 Add translation to Portuguese for Project Generation. PR#1602 by@Serrones.
  • 🌐 Add Japanese translation for Features. PR#1625 by@tokusumi.
  • 🌐 Initialize new language Korean for translations. PR#2018 by@hard-coders.
  • 🌐 Add Portuguese translation of Deployment. PR#1374 by@Serrones.

Internal

  • 🔥 Cleanup after upgrade for Docs Previews GitHub Action. PR#2248 by@tiangolo.
  • 🐛 Fix CI docs preview, unzip docs. PR#2246 by@tiangolo.
  • ✨ Add instant docs deploy previews for PRs from forks. PR#2244 by@tiangolo.
  • ⚡️ Build docs for languages in parallel in subprocesses to speed up CI. PR#2242 by@tiangolo.
  • 🐛 Fix docs order generation for partial translations. PR#2238 by@tiangolo.
  • 👥 Update FastAPI People. PR#2202 by@github-actions[bot].
  • ♻️ Update FastAPI People GitHub Action to send the PR as github-actions. PR#2201 by@tiangolo.
  • 🔧 Update FastAPI People GitHub Action config, run monthly. PR#2199 by@tiangolo.
  • 🐛 Fix FastAPI People GitHub Action Docker dependency, strike 1 ⚾. PR#2198 by@tiangolo.
  • 🐛 Fix FastAPI People GitHub Action Docker dependencies. PR#2197 by@tiangolo.
  • 🐛 Fix FastAPI People GitHub Action when there's nothing to change. PR#2196 by@tiangolo.
  • 👥 Add new section FastAPI People. PR#2195 by@tiangolo.
  • ⬆️ Upgrade GitHub Action Latest Changes. PR#2190 by@tiangolo.
  • ⬆️ Upgrade GitHub Action Label Approved. PR#2189 by@tiangolo.
  • 🔧 Update GitHub Action Label Approved, run at 12:00. PR#2185 by@tiangolo.
  • 👷 Upgrade GitHub Action Latest Changes. PR#2184 by@tiangolo.
  • 👷 Set GitHub Action Label Approved to run daily, not every minute. PR#2163 by@tiangolo.
  • 🔥 Remove pr-approvals GitHub Action as it's not compatible with forks. Use the new one. PR#2162 by@tiangolo.
  • 👷 Add GitHub Action Latest Changes. PR#2160.
  • 👷 Add GitHub Action Label Approved. PR#2161.

0.61.1

Fixes

  • Fix issues usingjsonable_encoder with SQLAlchemy models directly. PR#1987.

Docs

Translations

Internal

  • Improve docs maintainability by updatinghl_lines syntax to use ranges. PR#1863 by@la-mar.

0.61.0

Features

  • Add support for injectingHTTPConnection (asRequest andWebSocket). Useful for sharing app state in dependencies. PR#1827 by@nsidnev.
  • ExportWebSocketDisconnect and add example handling WebSocket disconnections to docs. PR#1822 by@rkbeatss.

Breaking Changes

  • Require Pydantic >1.0.0.
    • Remove support for deprecated Pydantic0.32.2. This improves maintainability and allows new features.
    • InFastAPI andAPIRouter:
      • Removepath operation decorators related/deprecated parameterresponse_model_skip_defaults (useresponse_model_exclude_unset instead).
      • Changepath operation decorators parameter default forresponse_model_exclude fromset() toNone (as is in Pydantic).
    • Inencoders.jsonable_encoder:
      • Remove deprecatedskip_defaults, use insteadexclude_unset.
      • Set default ofexclude fromset() toNone (as is in Pydantic).
    • PR#1862.
  • Inencoders.jsonable_encoder remove parametersqlalchemy_safe.
    • It was an early hack to allow returning SQLAlchemy models, but it was never documented, and the recommended way is using Pydantic'sorm_mode as described in the tutorial:SQL (Relational) Databases.
    • PR#1864.

Docs

Internal

  • 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.

0.60.2

0.60.1

  • Add debugging logs for GitHub actions to introspect GitHub hidden context. PR#1764.
  • Use OS preference theme for online docs. PR#1760 by@adriencaccia.
  • Upgrade Starlette to version0.13.6 to handle a vulnerability when using static files in Windows. PR#1759 by@jamesag26.
  • Pin Swagger UI temporarily, waiting for a fix forswagger-api/swagger-ui#6249. PR#1763.
  • Update GitHub Actions, use commit from PR for docs preview, not commit from pre-merge. PR#1761.
  • Update GitHub Actions, refactor Gitter bot. PR#1746.

0.60.0

  • Add GitHub Action to watch for missing preview docs and trigger a preview deploy. PR#1740.
  • Add custom GitHub Action to get artifact with docs preview. PR#1739.
  • Add new GitHub Actions to preview docs from PRs. PR#1738.
  • Add XML test coverage to support GitHub Actions. PR#1737.
  • Update badges and remove Travis now that GitHub Actions is the main CI. PR#1736.
  • Add GitHub Actions for CI, move from Travis. PR#1735.
  • Add support for adding OpenAPI schema for GET requests with a body. PR#1626 by@victorphoenix3.

0.59.0

0.58.1

0.58.0

  • Deep merge OpenAPI responses to preserve all the additional metadata. PR#1577.
  • Mention in docs that only main app events are run (not sub-apps). PR#1554 by@amacfie.
  • Fix body validation error response, do not include body variable when it is not embedded. PR#1553 by@amacfie.
  • Fix testing OAuth2 security scopes when using dependency overrides. PR#1549 by@amacfie.
  • Fix Model for JSON Schema keywordnot as a JSON Schema instead of a list. PR#1548 by@v-do.
  • Add support for OpenAPIservers. PR#1547 by@mikaello.

0.57.0

0.56.1

0.56.0

0.55.1

0.55.0

0.54.2

0.54.1

  • Update database test setup. PR#1226.
  • Improve test debugging by showing response text in failing tests. PR#1222 by@samuelcolvin.

0.54.0

0.53.2

0.53.1

0.53.0

0.52.0

0.51.0

  • Re-export utils from Starlette:
    • This allows using things likefrom fastapi.responses import JSONResponse instead offrom starlette.responses import JSONResponse.
    • It's mainly syntax sugar, a convenience for developer experience.
    • NowRequest,Response,WebSocket,status can be imported directly fromfastapi as infrom 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.
    • Documentation changes in many places, but new docs and noticeable improvements:
    • PR#1064.

0.50.0

  • Add link to Release Notes from docs about pinning versions for deployment. PR#1058.
  • Upgrade code to use the latest version of Starlette, including:
    • Several bug fixes.
    • Optional redirects of slashes, with or without ending in/.
    • Events for routers,"startup", and"shutdown".
    • PR#1057.
  • Add docs about pinning FastAPI versions for deployment:Deployment: FastAPI versions. PR#1056.

0.49.2

0.49.1

  • Fix path operation duplicated parameters when used in dependencies and the path operation function. PR#994 by@merowinger92.
  • Update Netlify previews deployment GitHub action as the fix is already merged and there's a new release. PR#1047.
  • Move mypy configurations to config file. PR#987 by@hukkinj1.
  • Temporary fix to Netlify previews not deployable from PRs from forks. PR#1046 by@mariacamilagl.

0.49.0

0.48.0

0.47.1

  • Fix model filtering inresponse_model, cloning sub-models. PR#889.
  • Fix FastAPI serialization of Pydantic models using ORM mode blocking the event loop. PR#888.

0.47.0

0.46.0

0.45.0

0.44.1

  • Add GitHub social preview images to git. PR#752.
  • Update PyPI "trove classifiers". PR#751.
  • Add full support for Python 3.8. Enable Python 3.8 in full in Travis. PR749.
  • Update "new issue" templates. PR#749.
  • Fix serialization of errors for exotic Pydantic types. PR#748 by@dmontagu.

0.44.0

0.43.0

0.42.0

  • Add dependencies withyield, a.k.a. exit steps, context managers, cleanup, teardown, ...
    • This allows adding extra code after a dependency is done. It can be used, for example, to close database connections.
    • Dependencies withyield can be normal orasync,FastAPI will run normal dependencies in a threadpool.
    • They can be combined with normal dependencies.
    • It's possible to have arbitrary trees/levels of dependencies withyield and exit steps are handled in the correct order automatically.
    • It works by default in Python 3.7 or above. For Python 3.6, it requires the extra backport dependencies:
      • async-exit-stack
      • async-generator
    • New docs atDependencies withyield.
    • Updated database docsSQL (Relational) Databases: MainFastAPI app.
    • PR#595.
  • Fixsitemap.xml in website. PR#598 by@samuelcolvin.

0.41.0

  • Upgrade required Starlette to0.12.9, the new range is>=0.12.9,<=0.12.9.
    • AddState to FastAPI apps atapp.state.
    • PR#593.
  • Improve handling of custom classes forRequests andAPIRoutes.
    • This helps to more easily solve use cases like:
      • Reading a body before and/or after a request (equivalent to a middleware).
      • Run middleware-like code only for a subset ofpath operations.
      • Process a request before passing it to apath operation function. E.g. decompressing, deserializing, etc.
      • Processing a response after being generated bypath operation functions but before returning it. E.g. adding custom headers, logging, adding extra metadata.
    • New docs section:Custom Request and APIRoute class.
    • PR#589 by@dmontagu.
  • Fix preserving custom route class in routers when including other sub-routers. PR#538 by@dmontagu.

0.40.0

0.39.0

  • Allow path parameters to have default values (e.g.None) and discard them instead of raising an error.
    • This allows declaring a parameter likeuser_id: str = None that can be taken from a query parameter, but the samepath operation can be included in a router with a path/users/{user_id}, in which case will be taken from the path and will be required.
    • PR#464 by@jonathanunderwood.
  • Add support for setting adefault_response_class in theFastAPI instance or ininclude_router. Initial PR#467 by@toppk.
  • Add support for type annotations using strings andfrom __future__ import annotations. PR#451 by@dmontagu.

0.38.1

0.38.0

  • Add recent articles toExternal Links and recent opinions. PR#490.
  • Upgrade support range for Starlette to include0.12.8. The new range is>=0.11.1,<=0.12.8". PR#477 by@dmontagu.
  • Upgrade support to Pydantic version 0.32.2 and update internal code to use it (breaking change). PR#463 by@dmontagu.

0.37.0

  • Add support for custom route classes for advanced use cases. PR#468 by@dmontagu.
  • Allow disabling Google fonts in ReDoc. PR#481 by@b1-luettje.
  • Fix security issue: when returning a sub-class of a response model and usingskip_defaults it could leak information. PR#485 by@dmontagu.
  • Enable tests for Python 3.8-dev. PR#465 by@Jamim.
  • Add support and tests for Pydantic dataclasses inresponse_model. PR#454 by@dconathan.
  • Fix typo in OAuth2 JWT tutorial. PR#447 by@pablogamboa.
  • Use themedia_type parameter inBody() params to set the media type in OpenAPI forrequestBody. PR#439 by@divums.
  • Add articleDeploying a scikit-learn model with ONNX and FastAPI byNico Axtmann. PR#438 by@naxty.
  • Allow setting custom422 (validation error) response/schema in OpenAPI.
    • And use media type from response class instead of fixedapplication/json (the default).
    • PR#437 by@divums.
  • Fix using"default" extra response with status codes at the same time. PR#489.
  • Allow additional responses to use status code ranges (like5XX and4XX) and"default". PR#435 by@divums.

0.36.0

  • Fix implementation forskip_defaults when returning a Pydantic model. PR#422 by@dmontagu.
  • Fix OpenAPI generation when using the same dependency in multiple places for the samepath operation. PR#417 by@dmontagu.
  • Allow having empty paths inpath operations used withinclude_router and aprefix.
    • This allows having a router for/cats and all itspath operations, while having one of them for/cats.
    • Now it doesn't have to be only/cats/ (with a trailing slash).
    • To use it, declare the path in thepath operation as the empty string ("").
    • PR#415 by@vitalik.
  • Fix mypy error after merging PR #415. PR#462.

0.35.0

0.34.0

  • Upgrade Starlette supported range to include the latest0.12.7. The new range is0.11.1,<=0.12.7. PR#367 by@dedsm.

  • Add test for OpenAPI schema with duplicate models from PR#333 by@dmontagu. PR#385.

0.33.0

0.32.0

  • Fix typo in docs for features. PR#380 by@MartinoMensio.

  • Fix source codelimit for example inQuery Parameters. PR#366 by@Smashman.

  • Update wording in docs aboutOAuth2 scopes. PR#371 by@cjw296.

  • Update docs forEnums to inherit fromstr and improve Swagger UI rendering. PR#351.

  • Fix regression, add Swagger UI deep linking again. PR#350.

  • Add test for having path templates inprefix of.include_router. PR#349.

  • Add note to docs:Include the same router multiple times with differentprefix. PR#348.

  • Fix OpenAPI/JSON Schema generation for two functions with the same name (in different modules) with the same composite bodies.

    • Composite bodies' IDs are now based on path, not only on route name, as the auto-generated name uses the function names, that can be duplicated in different modules.
    • The same new ID generation applies to response models.
    • This also changes the generated title for those models.
    • Only composite bodies and response models are affected because those are generated dynamically, they don't have a module (a Python file).
    • This also adds the possibility of using.include_router() with the sameAPIRoutermultiple times, with different prefixes, e.g./api/v2 and/api/latest, and it will now work correctly.
    • PR#347.

0.31.0

  • Upgrade Pydantic supported version to0.29.0.

0.30.1

0.30.0

  • Add support for Pydantic's ORM mode:

    • Updated documentation about SQL with SQLAlchemy, using Pydantic models with ORM mode, SQLAlchemy models with relations, separation of files, simplification of code and other changes. New docs:SQL (Relational) Databases.
    • The new support for ORM mode fixes issues/adds features related to ORMs with lazy-loading, hybrid properties, dynamic/getters (using@property decorators) and several other use cases.
    • This applies to ORMs like SQLAlchemy, Peewee, Tortoise ORM, GINO ORM and virtually any other.
    • If yourpath operations return an arbitrary object with attributes (e.g.my_item.name instead ofmy_item["name"]) AND you use aresponse_model, make sure to update the Pydantic models withorm_mode = True as described in the docs (link above).
    • New documentation about receiving plaindicts as request bodies:Bodies of arbitrarydicts.
    • New documentation about returning arbitrarydicts in responses:Response with arbitrarydict.
    • Technical Details:
      • When declaring aresponse_model it is used directly to generate the response content, from whatever was returned from thepath operation function.
      • Before this, the return content was first passed throughjsonable_encoder to ensure it was a "jsonable" object, like adict, instead of an arbitrary object with attributes (like an ORM model). That's why you should make sure to update your Pydantic models for objects with attributes to useorm_mode = True.
      • If you don't have aresponse_model, the return object will still be passed throughjsonable_encoder first.
      • When aresponse_model is declared, the sameresponse_model type declaration won't be used as is, it will be "cloned" to create an new one (a cloned PydanticField with all the submodels cloned as well).
      • This avoids/fixes a potential security issue: as the returned object is passed directly to Pydantic, if the returned object was a subclass of theresponse_model (e.g. you return aUserInDB that inherits fromUser but contains extra fields, likehashed_password, andUser is used in theresponse_model), it would still pass the validation (becauseUserInDB is a subclass ofUser) and the object would be returned as-is, including thehashed_password. To fix this, the declaredresponse_model is cloned, if it is a Pydantic model class (or contains Pydantic model classes in it, e.g. in aList[Item]), the Pydantic model class(es) will be a different one (the "cloned" one). So, an object that is a subclass won't simply pass the validation and returned as-is, because it is no longer a sub-class of the clonedresponse_model. Instead, a new Pydantic model object will be created with the contents of the returned object. So, it will be a new object (made with the data from the returned one), and will be filtered by the clonedresponse_model, containing only the declared fields as normally.
    • PR#322.
  • Remove/clean unused RegEx code in routing. PR#314 by@dmontagu.

  • Use default response status code descriptions for additional responses. PR#313 by@duxiaoyao.

  • Upgrade Pydantic support to0.28. PR#320 by@jekirl.

0.29.1

0.29.0

  • Add support for declaring aResponse parameter:

0.28.0

  • Implement dependency cache per request.

    • This avoids calling each dependency multiple times for the same request.
    • This is useful while calling external services, performing costly computation, etc.
    • This also means that if a dependency was declared as apath operation decorator dependency, possibly at the router level (with.include_router()) and then it is declared again in a specificpath operation, the dependency will be called only once.
    • The cache can be disabled per dependency declaration, usinguse_cache=False as inDepends(your_dependency, use_cache=False).
    • Updated docs at:Using the same dependency multiple times.
    • PR#292.
  • Implement dependency overrides for testing.

0.27.2

0.27.1

  • Fixauto_error=False handling inHTTPBearer security scheme. Do notraise when there's an incorrectAuthorization header ifauto_error=False. PR#282.

  • Fix type declaration ofHTTPException. PR#279.

0.27.0

0.26.0

0.25.0

  • Add support for Pydantic'sinclude,exclude,by_alias.

  • AddCONTRIBUTING.md file to GitHub, to help new contributors. PR#255 by@wshayes.

  • Add support for Pydantic'sskip_defaults:

0.24.0

  • Add support for WebSockets with dependencies and parameters.

  • Upgrade the compatible version of Pydantic to0.26.0.

    • This includes JSON Schema support for IP address and network objects, bug fixes, and other features.
    • PR#247 by@euri10.

0.23.0

  • Upgrade the compatible version of Starlette to0.12.0.

    • This includes support for ASGI 3 (the latest version of the standard).
    • It's now possible to useStarlette'sStreamingResponse with iterators, likefile-like objects (as those returned byopen()).
    • It's now possible to use the low level utilityiterate_in_threadpool fromstarlette.concurrency (for advanced scenarios).
    • PR#243.
  • Add OAuth2 redirect page for Swagger UI. This allows having delegated authentication in the Swagger UI docs. For this to work, you need to add{your_origin}/docs/oauth2-redirect to the allowed callbacks in your OAuth2 provider (in Auth0, Facebook, Google, etc).

    • For example, during development, it could behttp://localhost:8000/docs/oauth2-redirect.
    • Keep in mind that this callback URL is independent of whichever one is used by your frontend. You might also have another callback athttps://yourdomain.com/login/callback.
    • This is only to allow delegated authentication in the API docs with Swagger UI.
    • PR#198 by@steinitzu.
  • Make Swagger UI and ReDoc route handlers (path operations) beasync functions instead of lambdas to improve performance. PR#241 by@Trim21.

  • Make Swagger UI and ReDoc URLs parameterizable, allowing to host and serve local versions of them and have offline docs. PR#112 by@euri10.

0.22.0

  • Add support fordependencies parameter:

    • A parameter inpath operation decorators, for dependencies that should be executed but the return value is not important or not used in thepath operation function.
    • A parameter in the.include_router() method of FastAPI applications and routers, to include dependencies that should be executed in eachpath operation in a router.
      • This is useful, for example, to require authentication or permissions in specific group ofpath operations.
      • Differentdependencies can be applied to different routers.
    • Thesedependencies are run before the normal parameter dependencies. And normal dependencies are run too. They can be combined.
    • Dependencies declared in a router are executed first, then the ones defined inpath operation decorators, and then the ones declared in normal parameters. They are all combined and executed.
    • All this also supports usingSecurity withscopes in thosedependencies parameters, for more advanced OAuth 2.0 security scenarios with scopes.
    • New documentation aboutdependencies inpath operation decorators.
    • New documentation aboutdependencies in theinclude_router() method.
    • PR#235.
  • Fix OpenAPI documentation of Starlette URL convertors. Specially useful when usingpath convertors, to take a whole path as a parameter, like/some/url/{p:path}. PR#234 by@euri10.

  • Make default parameter utilities exported fromfastapi be functions instead of classes (the new functions return instances of those classes). To be able to override the return types and fixmypy errors in FastAPI's users' code. Applies toPath,Query,Header,Cookie,Body,Form,File,Depends, andSecurity. PR#226 and PR#231.

  • Separate development scriptstest.sh,lint.sh, andformat.sh. PR#232.

  • Re-enableblack formatting checks for Python 3.7. PR#229 by@zamiramir.

0.21.0

  • On body parsing errors, raisefrom previous exception, to allow better introspection in logging code. PR#192 by@ricardomomm.

  • Use Python logger named "fastapi" instead of root logger. PR#222 by@euri10.

  • Upgrade Pydantic to version 0.25. PR#225 by@euri10.

  • Fix typo in routing. PR#221 by@djlambert.

0.20.1

  • Add typing information to package including filepy.typed. PR#209 by@meadsteve.

  • Add FastAPI bot for Gitter. To automatically announce new releases. PR#189.

0.20.0

0.19.0

0.18.0

  • Add docs forHTTP Basic Auth. PR#177.

  • Upgrade HTTP Basic Auth handling with automatic headers (automatic browser login prompt). PR#175.

  • Update dependencies for security. PR#174.

  • Add docs forMiddleware. PR#173.

0.17.0

0.16.0

0.15.0

0.14.0

  • Improve automatically generated names ofpath operations in OpenAPI (in API docs). A functionread_items instead of having a generated name "Read Items Get" will have "Read Items". PR#155.

  • Add docs for:TestingFastAPI. PR#151.

  • Update/docs Swagger UI to enable deep linking. This allows sharing the URL pointing directly to thepath operation documentation in the docs. PR#148 by@wshayes.

  • Update development dependencies,Pipfile.lock. PR#150.

  • Include Falcon and Hug in:Alternatives, Inspiration and Comparisons.

0.13.0

  • Improve/upgrade OAuth2 scopes support withSecurityScopes:
    • SecurityScopes can be declared as a parameter likeRequest, to get the scopes of all super-dependencies/dependants.
    • ImproveSecurity handling, merging scopes when declaringSecurityScopes.
    • Allow usingSecurityBase (likeOAuth2) classes withDepends and still document them.Security now is needed only to declarescopes.
    • Updated docs about:OAuth2 with Password (and hashing), Bearer with JWT tokens.
    • New docs about:OAuth2 scopes.
    • PR#141.

0.12.1

  • Fix bug: handling additionalresponses inAPIRouter.include_router(). PR#140.

  • Fix typo in SQL tutorial. PR#138 by@mostaphaRoudsari.

  • Fix typos in section about nested models and OAuth2 with JWT. PR#127 by@mmcloud.

0.12.0

  • Add additionalresponses parameter topath operation decorators to extend responses in OpenAPI (and API docs).
    • It also allows extending existing responses generated fromresponse_model, declare other media types (like images), etc.
    • The new documentation is here:Additional Responses.
    • responses can also be added to.include_router(), the updated docs are here:Bigger Applications.
    • PR#97 originally initiated by@barsi.
  • Updatescripts/test-cov-html.sh to allow passing extra parameters like-vv, for development.

0.11.0

  • Addauto_error parameter to security utility functions. Allowing them to be optional. Also allowing to have multiple alternative security schemes that are then checked in a single dependency instead of each one verifying and returning the error to the client automatically when not satisfied. PR#134.

  • UpdateSQL Tutorial to close database sessions even when there are exceptions. PR#89 by@alexiri.

  • Fix duplicate dependency inpyproject.toml. PR#128 by@zxalif.

0.10.3

0.10.2

  • Fix OpenAPI (JSON Schema) for declarations of PythonUnion (JSON SchemaadditionalProperties). PR#121.

  • UpdateBackground Tasks with a note on Celery.

  • Document response models using unions and lists, updated at:Extra Models. PR#108.

0.10.1

0.10.0

0.9.1

0.9.0

0.8.0

  • Make development scripts executable. PR#76 by@euri10.

  • Add support for addingtags inapp.include_router(). PR#55 by@euri10. Documentation updated in the section:Bigger Applications.

  • Update docs related to Uvicorn to use new--reload option from version0.5.x. PR#74.

  • Updateisort imports and scripts to be compatible with newer versions. PR#75.

0.7.1

0.7.0

0.6.4

0.6.3

  • Add Favicons to docs. PR#53.

0.6.2

0.6.1

0.6.0

0.5.1

0.5.0

0.4.0

0.3.0

0.2.1

  • Fixjsonable_encoder for Pydantic models withConfig but withoutjson_encoders:#29.

0.2.0

  • Fix typos in Security section:#24 by@kkinder.

  • Add support for Pydantic custom JSON encoders:#21 by@euri10.

0.1.19

  • Upgrade Starlette version to the current latest0.10.1:#17 by@euri10.

[8]ページ先頭

©2009-2026 Movatter.jp