Releases: tiangolo/fastapi
Releases · tiangolo/fastapi
0.90.0
Upgrades
Docs
- 📝 Add article "Tortoise ORM / FastAPI 整合快速筆記" to External Links. PR #5496 by @Leon0824.
- 👥 Update FastAPI People. PR #5954 by @github-actions[bot].
- 📝 Micro-tweak help docs. PR #5960 by @tiangolo.
- 🔧 Update new issue chooser to direct to GitHub Discussions. PR #5948 by @tiangolo.
- 📝 Recommend GitHub Discussions for questions. PR #5944 by @tiangolo.
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
- ⬆️ Upgrade Ubuntu version for docs workflow. PR #5971 by @tiangolo.
- 🔧 Update sponsors badges. PR #5943 by @tiangolo.
- ✨ Compute FastAPI Experts including GitHub Discussions. PR #5941 by @tiangolo.
- ⬆️ Upgrade isort and update pre-commit. PR #5940 by @tiangolo.
- 🔧 Add template for questions in Discussions. PR #5920 by @tiangolo.
- 🔧 Update Sponsor Budget Insight to Powens. PR #5916 by @tiangolo.
- 🔧 Update GitHub Sponsors badge data. PR #5915 by @tiangolo.
0.89.1
Fixes
- 🐛 Ignore Response classes on return annotation. PR #5855 by @Kludex. See the new docs in the PR below.
Docs
- 📝 Update docs and examples for Response Model with Return Type Annotations, and update runtime error. PR #5873 by @tiangolo. New docs at Response Model - Return Type: Other Return Type Annotations.
- 📝 Add External Link: FastAPI lambda container: serverless simplified. PR #5784 by @rafrasenberg.
Translations
- 🌐 Add Turkish translation for
docs/tr/docs/tutorial/first_steps.md
. PR #5691 by @Kadermiyanyedi.
0.89.0
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
- 📝 Add External Link: Authorization on FastAPI with Casbin. PR #5712 by @Xhy-5000.
- ✏ Fix typo in
docs/en/docs/async.md
. PR #5785 by @Kingdageek. - ✏ Fix typo in
docs/en/docs/deployment/concepts.md
. PR #5824 by @kelbyfaessler.
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
- ⬆ Update coverage[toml] requirement from <7.0,>=6.5.0 to >=6.5.0,<8.0. PR #5801 by @dependabot[bot].
- ⬆ Update uvicorn[standard] requirement from <0.19.0,>=0.12.0 to >=0.12.0,<0.21.0 for development. PR #5795 by @dependabot[bot].
- ⬆ Bump dawidd6/action-download-artifact from 2.24.2 to 2.24.3. PR #5842 by @dependabot[bot].
- 👥 Update FastAPI People. PR #5825 by @github-actions[bot].
- ⬆ Bump types-ujson from 5.5.0 to 5.6.0.0. PR #5735 by @dependabot[bot].
- ⬆ Bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4. PR #5750 by @dependabot[bot].
- 👷 Add GitHub Action gate/check. PR #5492 by @webknjaz.
- 🔧 Update sponsors, add Svix. PR #5848 by @tiangolo.
- 🔧 Remove Doist sponsor. PR #5847 by @tiangolo.
- ⬆ Update sqlalchemy requirement from <=1.4.41,>=1.3.18 to >=1.3.18,<1.4.43. PR #5540 by @dependabot[bot].
- ⬆ Bump nwtgck/actions-netlify from 1.2.4 to 2.0.0. PR #5757 by @dependabot[bot].
- 👷 Refactor CI artifact upload/download for docs previews. PR #5793 by @tiangolo.
- ⬆ Bump pypa/gh-action-pypi-publish from 1.5.1 to 1.5.2. PR #5714 by @dependabot[bot].
- 👥 Update FastAPI People. PR #5722 by @github-actions[bot].
- 🔧 Update sponsors, disable course bundle. PR #5713 by @tiangolo.
- ⬆ Update typer[all] requirement from <0.7.0,>=0.6.1 to >=0.6.1,<0.8.0. PR #5639 by @dependabot[bot].
0.88.0
Upgrades
- ⬆ Bump Starlette to version
0.22.0
to fix bad encoding for query parameters in newTestClient
. PR #5659 by @azogue.
Docs
- ✏️ Fix typo in docs for
docs/en/docs/advanced/middleware.md
. PR #5376 by @rifatrakib.
Translations
Internal
- 👷 Tweak build-docs to improve CI performance. PR #5699 by @tiangolo.
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #5566 by @pre-commit-ci[bot].
- ⬆️ Upgrade Ruff. PR #5698 by @tiangolo.
- 👷 Remove pip cache for Smokeshow as it depends on a requirements.txt. PR #5700 by @tiangolo.
- 💚 Fix pip cache for Smokeshow. PR #5697 by @tiangolo.
- 👷 Fix and tweak CI cache handling. PR #5696 by @tiangolo.
- 👷 Update
setup-python
action in tests to use new caching feature. PR #5680 by @madkinsz. - ⬆ Bump black from 22.8.0 to 22.10.0. PR #5569 by @dependabot[bot].
0.87.0
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 usingbump-testclient
.
- Now the
- 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
- ⬆️ Upgrade and relax dependencies for extras "all". PR #5634 by @tiangolo.
- ✨ Re-export Starlette's
WebSocketException
and add it to docs. PR #5629 by @tiangolo. - 📝 Update references to Requests for tests to HTTPX, and add HTTPX to extras. PR #5628 by @tiangolo.
- ⬆ Upgrade Starlette to
0.21.0
, including the newTestClient
based on HTTPX. PR #5471 by @pawelrubin.
Docs
- ✏️ Tweak Help FastAPI from PR review after merging. PR #5633 by @tiangolo.
- ✏️ Clarify docs on CORS. PR #5627 by @paxcodes.
- 📝 Update Help FastAPI: Help Maintain FastAPI. PR #5632 by @tiangolo.
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
- ✨ Use Ruff for linting. PR #5630 by @tiangolo.
- 🛠 Add Arabic issue number to Notify Translations GitHub Action. PR #5610 by @tiangolo.
- ⬆ Bump dawidd6/action-download-artifact from 2.24.1 to 2.24.2. PR #5609 by @dependabot[bot].
- ⬆ Bump dawidd6/action-download-artifact from 2.24.0 to 2.24.1. PR #5603 by @dependabot[bot].
- 📝 Update coverage badge to use Samuel Colvin's Smokeshow. PR #5585 by @tiangolo.
0.86.0
Features
- ⬆ Add Python 3.11 to the officially supported versions. PR #5587 by @tiangolo.
- ✅ Enable tests for Python 3.11. PR #4881 by @tiangolo.
Fixes
Docs
- ✏ Fix typo in
docs/en/docs/tutorial/security/oauth2-jwt.md
. PR #5584 by @vivekashok1221.
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
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
- ⬆ Bump internal dependency mypy from 0.971 to 0.982. PR #5541 by @dependabot[bot].
- ⬆ Bump nwtgck/actions-netlify from 1.2.3 to 1.2.4. PR #5507 by @dependabot[bot].
- ⬆ Bump internal dependency types-ujson from 5.4.0 to 5.5.0. PR #5537 by @dependabot[bot].
- ⬆ Bump dawidd6/action-download-artifact from 2.23.0 to 2.24.0. PR #5508 by @dependabot[bot].
- ⬆ Update internal dependency pytest-cov requirement from <4.0.0,>=2.12.0 to >=2.12.0,<5.0.0. PR #5539 by @dependabot[bot].
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #5536 by @pre-commit-ci[bot].
- 🐛 Fix internal Trio test warnings. PR #5547 by @samuelcolvin.
- ⬆ [pre-commit.ci] pre-commit autoupdate. PR #5408 by @pre-commit-ci[bot].
- ⬆️ Upgrade Typer to include Rich in scripts for docs. PR #5502 by @tiangolo.
- 🐛 Fix calling
mkdocs
for languages as a subprocess to fix/enable MkDocs Material search plugin. PR #5501 by @tiangolo.
0.85.1
Fixes
- 🐛 Fix support for strings in OpenAPI status codes:
default
,1XX
,2XX
,3XX
,4XX
,5XX
. PR #5187 by @JarroVGIT.
Docs
Internal
- 👥 Update FastAPI People. PR #5447 by @github-actions[bot].
- 🔧 Disable Material for MkDocs search plugin. PR #5495 by @tiangolo.
- 🔇 Ignore Trio warning in tests for CI. PR #5483 by @samuelcolvin.
0.85.0
Features
- ⬆ Upgrade version required of Starlette from
0.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. 😅☠