Skip to content

Releases: tiangolo/fastapi

0.90.0

08 Feb 10:33
Compare
Choose a tag to compare

Upgrades

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

Docs

Translations

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

Internal

0.89.1

10 Jan 16:39
Compare
Choose a tag to compare

Fixes

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

Docs

Translations

  • 🌐 Add Turkish translation for docs/tr/docs/tutorial/first_steps.md. PR #5691 by @Kadermiyanyedi.

0.89.0

07 Jan 17:22
Compare
Choose a tag to compare

Features

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

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

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()


class Item(BaseModel):
    name: str
    price: float


@app.get("/items/")
async def read_items() -> list[Item]:
    return [
        Item(name="Portal Gun", price=42.0),
        Item(name="Plumbus", price=32.0),
    ]

FastAPI will use the return type annotation to perform:

  • Data validation
  • Automatic documentation
    • It could power automatic client generators
  • Data filtering

Before this version it was only supported via the response_model parameter.

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

Docs

Translations

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

Internal

0.88.0

27 Nov 14:53
Compare
Choose a tag to compare

Upgrades

  • ⬆ Bump Starlette to version 0.22.0 to fix bad encoding for query parameters in new TestClient. PR #5659 by @azogue.

Docs

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

Translations

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

Internal

0.87.0

13 Nov 21:41
Compare
Choose a tag to compare

Highlights of this release:

  • Upgraded Starlette
    • Now the TestClient is based on HTTPX instead of Requests. 🚀
    • There are some possible breaking changes in the TestClient usage, but @Kludex built bump-testclient to help you automatize migrating your tests. Make sure you are using Git and that you can undo any unnecessary changes (false positive changes, etc) before using bump-testclient.
  • New WebSocketException (and docs), re-exported from Starlette.
  • Upgraded and relaxed dependencies for package extras all (including new Uvicorn version), when you install "fastapi[all]".
  • New docs about how to Help Maintain FastAPI.

Features

Docs

Translations

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

Internal

0.86.0

03 Nov 21:24
Compare
Choose a tag to compare

Features

Fixes

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

Docs

Translations

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

Internal

  • 👷 Update FastAPI People to exclude bots: pre-commit-ci, dependabot. PR #5586 by @tiangolo.
  • 🎨 Format OpenAPI JSON in test_starlette_exception.py. PR #5379 by @iudeen.
  • 👷 Switch from Codecov to Smokeshow plus pytest-cov to pure coverage for internal tests. PR #5583 by @tiangolo.
  • 👥 Update FastAPI People. PR #5571 by @github-actions[bot].

0.85.2

31 Oct 19:04
Compare
Choose a tag to compare

Note: this release doesn't affect final users, it's mainly internal. It unlocks Pydanitc work with the integration that runs FastAPI's tests in Pydantic's CI.

Docs

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

Translations

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

Internal

0.85.1

14 Oct 20:59
Compare
Choose a tag to compare

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

15 Sep 13:59
Compare
Choose a tag to compare

Features

  • ⬆ Upgrade version required of Starlette from 0.19.1 to 0.20.4. Initial PR #4820 by @Kludex.
    • This includes several bug fixes in Starlette.
  • ⬆️ Upgrade Uvicorn max version in public extras: all. From >=0.12.0,<0.18.0 to >=0.12.0,<0.19.0. PR #5401 by @tiangolo.

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

14 Sep 18:43
Compare
Choose a tag to compare

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.