FastAPI Versions Save

FastAPI framework, high performance, easy to learn, fast to code, ready for production

0.110.1

2 weeks ago

Fixes

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

Refactors

  • ♻️ Update mypy. PR #11049 by @k0t3n.
  • ♻️ Simplify string format with f-strings in fastapi/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 in fastapi/security/oauth2.py. PR #11368 by @shandongbinzhou.
  • 📝 Update links to Pydantic docs to point to new website. PR #11328 by @alejsdev.
  • ✏️ Fix typo in docs/en/docs/tutorial/extra-models.md. PR #11329 by @alejsdev.
  • 📝 Update project-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.
  • 📝 Update python-multipart GitHub link in all docs from https://andrew-d.github.io/python-multipart/ to https://github.com/Kludex/python-multipart. PR #11239 by @joshjhans.

Translations

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

Internal

0.110.0

1 month ago

Breaking Changes

  • 🐛 Fix unhandled growing memory for internal server errors, refactor dependencies with yield and except to require raising again as in regular Python. PR #11191 by @tiangolo.
    • This is a breaking change (and only slightly) if you used dependencies with yield, used except 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 with yield and except.

In short, if you had dependencies that looked like:

def my_dep():
    try:
        yield
    except SomeException:
        pass

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

def my_dep():
    try:
        yield
    except SomeException:
        raise

Docs

Translations

  • 🌐 Add German translation for docs/de/docs/reference/background.md. PR #10820 by @nilslindemann.
  • 🌐 Add German translation for docs/de/docs/reference/templating.md. PR #10842 by @nilslindemann.
  • 🌐 Add German translation for docs/de/docs/external-links.md. PR #10852 by @nilslindemann.
  • 🌐 Update Turkish translation for docs/tr/docs/tutorial/query-params.md. PR #11162 by @hasansezertasan.
  • 🌐 Add German translation for docs/de/docs/reference/encoders.md. PR #10840 by @nilslindemann.
  • 🌐 Add German translation for docs/de/docs/reference/responses.md. PR #10825 by @nilslindemann.
  • 🌐 Add German translation for docs/de/docs/reference/request.md. PR #10821 by @nilslindemann.
  • 🌐 Add Turkish translation for docs/tr/docs/tutorial/query-params.md. PR #11078 by @emrhnsyts.
  • 🌐 Add German translation for docs/de/docs/reference/fastapi.md. PR #10813 by @nilslindemann.
  • 🌐 Add German translation for docs/de/docs/newsletter.md. PR #10853 by @nilslindemann.
  • 🌐 Add Traditional Chinese translation for docs/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 for docs/tr/docs/tutorial/first-steps.md. PR #11094 by @hasansezertasan.
  • 🌐 Add Spanish translation for docs/es/docs/advanced/security/index.md. PR #2278 by @Xaraxx.
  • 🌐 Add Spanish translation for docs/es/docs/advanced/response-headers.md. PR #2276 by @Xaraxx.
  • 🌐 Add Spanish translation for docs/es/docs/deployment/index.md and ~/deployment/versions.md. PR #9669 by @pabloperezmoya.
  • 🌐 Add Spanish translation for docs/es/docs/benchmarks.md. PR #10928 by @pablocm83.
  • 🌐 Add Spanish translation for docs/es/docs/advanced/response-change-status-code.md. PR #11100 by @alejsdev.

0.109.2

2 months ago

Upgrades

  • ⬆️ Upgrade version of Starlette to >= 0.36.3. PR #11086 by @tiangolo.

Translations

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

Internal

0.109.1

2 months ago

Security fixes

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

Read more in the advisory: Content-Type Header ReDoS.

Features

  • ✨ Include HTTP 205 in status codes with no body. PR #10969 by @tiangolo.

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 in fastapi/utils.py. PR #10576 by @eukub.
  • 🔧 Fix Ruff configuration unintentionally enabling and re-disabling mccabe complexity check. PR #10893 by @jiridanek.
  • ✅ Re-enable test in tests/test_tutorial/test_header_params/test_tutorial003.py after fix in Starlette. PR #10904 by @ooknimm.

Docs

  • 📝 Tweak wording in help-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 in fastapi/security/oauth2.py. PR #10972 by @RafalSkolasinski.
  • 📝 Update HTTPException details in docs/en/docs/tutorial/handling-errors.md. PR #5418 by @papb.
  • ✏️ A few tweaks in docs/de/docs/tutorial/first-steps.md. PR #10959 by @nilslindemann.
  • ✏️ Fix link in docs/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 in docs/tutorial/sql-databases.md in several languages. PR #10716 by @theoohoho.
  • ✏️ Remove broken links from external_links.yml. PR #10943 by @Torabek.
  • 📝 Update template docs with more info about url_for. PR #5937 by @EzzEddin.
  • 📝 Update usage of Token model in security docs. PR #9313 by @piotrszacilowski.
  • ✏️ Update highlighted line in docs/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 to docs/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 of en/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 to tutorial/bigger-applications.md. PR #10552 by @nilslindemann.
  • ✏️ Fix Pydantic method name in docs/en/docs/advanced/path-operation-advanced-configuration.md. PR #10826 by @ahmedabdou14.

Translations

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

Internal

0.109.0

3 months ago

Features

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.

Docs

  • ✏️ Fix typo in docs/en/docs/alternatives.md. PR #10931 by @s111d.
  • 📝 Replace email with username in docs_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 in docs/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 in docs/en/docs/alternatives.md and docs/en/docs/tutorial/dependencies/index.md. PR #10906 by @s111d.
  • ✏️ Fix typos in docs/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 with AsyncClient. 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 in openapi-callbacks.md. PR #10673 by @kayjan.
  • ✏️ Fix typo in fastapi/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 name create_item with update_item when appropriate. PR #5913 by @OttoAndrey.
  • ✏️ Fix typo in dependencies with yield source examples. PR #10847 by @tiangolo.

Translations

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

Internal

0.108.0

3 months ago

Upgrades

  • ⬆️ Upgrade Starlette to >=0.29.0,<0.33.0, update docs and usage of templates with new Starlette arguments. PR #10846 by @tiangolo.

0.107.0

3 months ago

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

3 months ago

Breaking Changes

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

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

Dependencies with yield, HTTPException and Background Tasks

Dependencies with yield now can raise HTTPException and other exceptions after yield. 🎉

Read the new docs here: Dependencies with yield and HTTPException.

from fastapi import Depends, FastAPI, HTTPException
from typing_extensions import Annotated

app = FastAPI()


data = {
    "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
    "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
}


class OwnerError(Exception):
    pass


def get_username():
    try:
        yield "Rick"
    except OwnerError as e:
        raise HTTPException(status_code=400, detail=f"Onwer error: {e}")


@app.get("/items/{item_id}")
def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
    if item_id not in data:
        raise HTTPException(status_code=404, detail="Item not found")
    item = data[item_id]
    if item["owner"] != username:
        raise OwnerError(username)
    return item

Before FastAPI 0.106.0, raising exceptions after yield was not possible, the exit code in dependencies with yield was executed after the response was sent, so Exception 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 with yield.

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 the diagram in the Release Notes for FastAPI 0.106.0.

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

0.105.0

4 months ago

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

5 months ago

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 the Swagger UI side.

Docs

  • 📝 Update data structure and render for external-links. PR #10495 by @tiangolo.
  • ✏️ Fix link to SPDX license identifier in docs/en/docs/tutorial/metadata.md. PR #10433 by @worldworm.
  • 📝 Update example validation error from Pydantic v1 to match Pydantic v2 in docs/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 in docs/en/docs/reference/dependencies.md. PR #10465 by @suravshresth.
  • ✏️ Fix typos and rewordings in docs/en/docs/tutorial/body-nested-models.md. PR #10468 by @yogabonito.
  • 📝 Update docs, remove references to removed pydantic.Required in docs/en/docs/tutorial/query-params-str-validations.md. PR #10469 by @yogabonito.
  • ✏️ Fix typo in docs/en/docs/reference/index.md. PR #10467 by @tarsil.
  • 🔥 Remove unnecessary duplicated docstrings. PR #10484 by @tiangolo.

Internal