- Release Notes
- Latest changes
- 0.61.1
- 0.61.0
- 0.60.2
- 0.60.1
- 0.60.0
- 0.59.0
- 0.58.1
- 0.58.0
- 0.57.0
- 0.56.1
- 0.56.0
- 0.55.1
- 0.55.0
- 0.54.2
- 0.54.1
- 0.54.0
- 0.53.2
- 0.53.1
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.2
- 0.49.1
- 0.49.0
- 0.48.0
- 0.47.1
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.1
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.1
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.1
- 0.30.0
- 0.29.1
- 0.29.0
- 0.28.0
- 0.27.2
- 0.27.1
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.1
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.1
- 0.12.0
- 0.11.0
- 0.10.3
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.1
- 0.9.0
- 0.8.0
- 0.7.1
- 0.7.0
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.19
Release Notes
Warning
The current page still doesn’t have a translation for this language.
But you can help translating it: Contributing.
Latest changes
0.61.1
Fixes
- Fix issues using
jsonable_encoder
with SQLAlchemy models directly. PR #1987.
Docs
- Fix typo in NoSQL docs. PR #1980 by @facundojmaero.
Translations
- Add translation for main page to Japanese PR #1571 by @ryuckel.
- Initialize French translations. PR #1975 by @JulianMaurin-BM.
- Initialize Turkish translations. PR #1905 by @ycd.
Internal
0.61.0
Features
- Add support for injecting
HTTPConnection
(asRequest
andWebSocket
). Useful for sharing app state in dependencies. PR #1827 by @nsidnev. - Export
WebSocketDisconnect
and add example handling WebSocket disconnections to docs. PR #1822 by @rkbeatss.
Breaking Changes
- Require Pydantic >
1.0.0
.- Remove support for deprecated Pydantic
0.32.2
. This improves maintainability and allows new features. - In
FastAPI
andAPIRouter
:- Remove path operation decorators related/deprecated parameter
response_model_skip_defaults
(useresponse_model_exclude_unset
instead). - Change path operation decorators parameter default for
response_model_exclude
fromset()
toNone
(as is in Pydantic).
- Remove path operation decorators related/deprecated parameter
- In
encoders.jsonable_encoder
:- Remove deprecated
skip_defaults
, use insteadexclude_unset
. - Set default of
exclude
fromset()
toNone
(as is in Pydantic).
- Remove deprecated
- PR #1862.
- Remove support for deprecated Pydantic
- In
encoders.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’s
orm_mode
as described in the tutorial: SQL (Relational) Databases. - PR #1864.
- It was an early hack to allow returning SQLAlchemy models, but it was never documented, and the recommended way is using Pydantic’s
Docs
- Add link to the course by TestDriven.io: Test-Driven Development with FastAPI and Docker. PR #1860.
- Fix empty log message in docs example about handling errors. PR #1815 by @manlix.
- Reword text to reduce ambiguity while not being gender-specific. PR #1824 by @Mause.
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
- Fix typo in docs for query parameters. PR #1832 by @ycd.
- Add docs about Async Tests. PR #1619 by @empicano.
- Raise an exception when using form data (
Form
,File
) without havingpython-multipart
installed.- Up to now the application would run, and raise an exception only when receiving a request with form data, the new behavior, raising early, will prevent from deploying applications with broken dependencies.
- It also detects if the correct package
python-multipart
is installed instead of the incorrectmultipart
(both importable asmultipart
). - PR #1851 based on original PR #1627 by @chrisngyn, @YKo20010, @kx-chen.
- Re-enable Gitter releases bot. PR #1831.
- Add link to async SQL databases tutorial from main SQL tutorial. PR #1813 by @short2strings.
- Fix typo in tutorial about behind a proxy. PR #1807 by @toidi.
- Fix typo in Portuguese docs. PR #1795 by @izaguerreiro.
- Add translations setup for Ukrainian. PR #1830.
- Add external link Build And Host Fast Data Science Applications Using FastAPI. PR #1786 by @Kludex.
- Fix encoding of Pydantic models that inherit from others models with custom
json_encoders
. PR #1769 by @henrybetts. - Simplify and improve
jsonable_encoder
. PR #1754 by @MashhadiNima. - Simplify internal code syntax in several points. PR #1753 by @uriyyo.
- Improve internal typing, declare
Optional
parameters. PR #1731 by @MashhadiNima. - Add external link Deploy FastAPI on Azure App Service to docs. PR #1726 by @windson.
- Add link to Starlette docs about WebSocket testing. PR #1717 by @hellocoldworld.
- Refactor generating dependant, merge for loops. PR #1714 by @Bloodielie.
- Update example for templates with Jinja to include HTML media type. PR #1690 by @frafra.
- Fix typos in docs for security. PR #1678 by @nilslindemann.
- Fix typos in docs for dependencies. PR #1675 by @nilslindemann.
- Fix type annotation for
**extra
parameters inFastAPI
. PR #1659 by @bharel. - Bump MkDocs Material to fix docs in browsers with dark mode. PR #1789 by @adriencaccia.
- Remove docs preview comment from each commit. PR #1826.
- Update GitHub context extraction for Gitter notification bot. PR #1766.
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 version
0.13.6
to handle a vulnerability when using static files in Windows. PR #1759 by @jamesag26. - Pin Swagger UI temporarily, waiting for a fix for swagger-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
- Fix typo in docstring for OAuth2 utils. PR #1621 by @tomarv2.
- Update JWT docs to use Python-jose instead of PyJWT. Initial PR #1610 by @asheux.
- Fix/re-enable search bar in docs. PR #1703.
- Auto-generate a “server” in OpenAPI
servers
when there’s aroot_path
instead of prefixing all thepaths
:- Add a new parameter for
FastAPI
classes:root_path_in_servers
to disable the auto-generation ofservers
. - New docs about
root_path
andservers
in Additional Servers. - Update OAuth2 examples to use a relative URL for
tokenUrl="token"
to make sure those examples keep working as-is even when behind a reverse proxy. - Initial PR #1596 by @rkbeatss.
- Add a new parameter for
- Fix typo/link in External Links. PR #1702.
- Update handling of External Links to use a data file and allow translating the headers without becoming obsolete quickly when new links are added. PR #https://github.com/tiangolo/fastapi/pull/1701.
- Add external link Machine learning model serving in Python using FastAPI and Streamlit to docs. PR #1669 by @davidefiocco.
- Add note in docs on order in Pydantic Unions. PR #1591 by @kbanc.
- Improve support for tests in editor. PR #1699.
- Pin dependencies. PR #1697.
- Update isort to version 5.x.x. PR #1670 by @asheux.
0.58.1
- Add link in docs to Pydantic data types. PR #1612 by @tayoogunbiyi.
- Fix link in warning logs for
openapi_prefix
. PR #1611 by @bavaria95. - Fix bad link in docs. PR #1603 by @molto0504.
- Add Vim temporary files to
.gitignore
for contributors using Vim. PR #1590 by @asheux. - Fix typo in docs for sub-applications. PR #1578 by @schlpbch.
- Use
Optional
in all the examples in the docs. Original PR #1574 by @chrisngyn, @kx-chen, @YKo20010. Updated and merged PR #1644. - Update tests and handling of
response_model_by_alias
. PR #1642. - Add translation to Chinese for Body - Fields - 请求体 - 字段. PR #1569 by @waynerv.
- Update Chinese translation of main page. PR #1564 by @waynerv.
- Add translation to Chinese for Body - Multiple Parameters - 请求体 - 多个参数. PR #1532 by @waynerv.
- Add translation to Chinese for Path Parameters and Numeric Validations - 路径参数和数值校验. PR #1506 by @waynerv.
- Add GitHub action to auto-label approved PRs (mainly for translations). PR #1638.
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 keyword
not
as a JSON Schema instead of a list. PR #1548 by @v-do. - Add support for OpenAPI
servers
. PR #1547 by @mikaello.
0.57.0
- Remove broken link from “External Links”. PR #1565 by @victorphoenix3.
- Update/fix docs for WebSockets with dependencies. Original PR #1540 by @ChihSeanHsu.
- Add support for Python’s
http.HTTPStatus
instatus_code
parameters. PR #1534 by @retnikt. - When using Pydantic models with
__root__
, use the internal value injsonable_encoder
. PR #1524 by @patrickkwang. - Update docs for path parameters. PR #1521 by @yankeexe.
- Update docs for first steps, links and rewording. PR #1518 by @yankeexe.
- Enable
showCommonExtensions
in Swagger UI to show additional validations likemaxLength
, etc. PR #1466 by @TiewKH. - Make
OAuth2PasswordRequestFormStrict
importable directly fromfastapi.security
. PR #1462 by @RichardHoekstra. - Add docs about Default response class. PR #1455 by @TezRomacH.
- Add note in docs about additional parameters
response_model_exclude_defaults
andresponse_model_exclude_none
in Response Model. PR #1427 by @wshayes. - Add note about PyCharm Pydantic plugin to docs. PR #1420 by @koxudaxi.
- Update and clarify testing function name. PR #1395 by @chenl.
- Fix duplicated headers created by indirect dependencies that use the request directly. PR #1386 by @obataku from tests by @scottsmith2gmail.
- Upgrade Starlette version to
0.13.4
. PR #1361 by @rushton. - Improve error handling and feedback for requests with invalid JSON. PR #1354 by @aviramha.
- Add support for declaring metadata for tags in OpenAPI. New docs at Tutorial - Metadata and Docs URLs - Metadata for tags. PR #1348 by @thomas-maschler.
- Add basic setup for Russian translations. PR #1566.
- Remove obsolete Chinese articles after adding official community translations. PR #1510 by @waynerv.
- Add
__repr__
for path operation function parameter helpers (likeQuery
,Depends
, etc) to simplify debugging. PR #1560 by @rkbeatss and @victorphoenix3.
0.56.1
- Add link to advanced docs from tutorial. PR #1512 by @kx-chen.
- Remove internal unnecessary f-strings. PR #1526 by @kotamatsuoka.
- Add translation to Chinese for Query Parameters and String Validations - 查询参数和字符串校验. PR #1500 by @waynerv.
- Add translation to Chinese for Request Body - 请求体. PR #1492 by @waynerv.
- Add translation to Chinese for Help FastAPI - Get Help - 帮助 FastAPI - 获取帮助. PR #1465 by @waynerv.
- Add translation to Chinese for Query Parameters - 查询参数. PR #1454 by @waynerv.
- Add translation to Chinese for Contributing - 开发 - 贡献. PR #1460 by @waynerv.
- Add translation to Chinese for Path Parameters - 路径参数. PR #1453 by @waynerv.
- Add official Microsoft project generator for serving spaCy with FastAPI and Azure Cognitive Skills to Project Generators. PR #1390 by @kabirkhan.
- Update docs in Python Types Intro to include info about
Optional
. Original PR #1377 by @yaegassy. - Fix support for callable class dependencies with
yield
. PR #1365 by @mrosales. - Fix/remove incorrect error logging when a client sends invalid payloads. PR #1351 by @dbanty.
- Add translation to Chinese for First Steps - 第一步. PR #1323 by @waynerv.
- Fix generating OpenAPI for apps using callbacks with routers including Pydantic models. PR #1322 by @nsidnev.
- Optimize internal regex performance in
get_path_param_names()
. PR #1243 by @heckad. - Remove
*,
from functions in docs where it’s not needed. PR #1239 by @pankaj-giri. - Start translations for Italian. PR #1557 by @csr.
0.56.0
- Add support for ASGI
root_path
:- Use
root_path
internally for mounted applications, so that OpenAPI and the docs UI works automatically without extra configurations and parameters. - Add new
root_path
parameter forFastAPI
applications to provide it in cases where it can be set with the command line (e.g. for Uvicorn and Hypercorn, with the parameter--root-path
). - Deprecate
openapi_prefix
parameter in favor of the newroot_path
parameter. - Add new/updated docs for Sub Applications - Mounts, without
openapi_prefix
(as it is now handled automatically). - Add new/updated docs for Behind a Proxy, including how to setup a local testing proxy with Traefik and using
root_path
. - Update docs for Extending OpenAPI with the new
openapi_prefix
parameter passed (internally generated fromroot_path
). - Original PR #1199 by @iksteen.
- Use
- Update new issue templates and docs: Help FastAPI - Get Help. PR #1531.
- Update GitHub action issue-manager. PR #1520.
- Add new links:
- English articles:
- Real-time Notifications with Python and Postgres by Guillermo Cruz.
- Microservice in Python using FastAPI by Paurakh Sharma Humagain.
- Build simple API service with Python FastAPI — Part 1 by cuongld2.
- FastAPI + Zeit.co = 🚀 by Paul Sec.
- Build a web API from scratch with FastAPI - the workshop by Sebastián Ramírez (tiangolo).
- Build a Secure Twilio Webhook with Python and FastAPI by Twilio.
- Using FastAPI with Django by Stavros Korokithakis.
- Introducing Dispatch by Netflix.
- Podcasts:
- Talks:
- PR #1467.
- English articles:
- Add translation to Chinese for Python Types Intro - Python 类型提示简介. PR #1197 by @waynerv.
0.55.1
- Fix handling of enums with their own schema in path parameters. To support samuelcolvin/pydantic#1432 in FastAPI. PR #1463.
0.55.0
- Allow enums to allow them to have their own schemas in OpenAPI. To support samuelcolvin/pydantic#1432 in FastAPI. PR #1461.
- Add links for funding through GitHub sponsors. PR #1425.
- Update issue template for for questions. PR #1344 by @retnikt.
- Update warning about storing passwords in docs. PR #1336 by @skorokithakis.
- Fix typo. PR #1326 by @chenl.
- Add translation to Portuguese for Alternatives, Inspiration and Comparisons - Alternativas, Inspiração e Comparações. PR #1325 by @Serrones.
- Fix 2 typos in docs. PR #1324 by @waynerv.
- Update CORS docs, fix correct default of
max_age=600
. PR #1301 by @derekbekoe. - Add translation of main page to Portuguese. PR #1300 by @Serrones.
- Re-word and clarify docs for extra info in fields. PR #1299 by @chris-allnutt.
- Make sure the
*
in short features in the docs is consistent (after.
) in all languages. PR #1424. - Update order of execution for
get_db
in SQLAlchemy tutorial. PR #1293 by @bcb. - Fix typos in Async docs. PR #1423.
0.54.2
- Add translation to Spanish for Concurrency and async / await - Concurrencia y async / await. PR #1290 by @alvaropernas.
- Remove obsolete vote link. PR #1289 by @donhui.
- Allow disabling docs UIs by just disabling OpenAPI with
openapi_url=None
. New example in docs: Advanced: Conditional OpenAPI. PR #1421. - Add translation to Portuguese for Benchmarks - Comparações. PR #1274 by @Serrones.
- Add translation to Portuguese for Tutorial - User Guide - Intro - Tutorial - Guia de Usuário - Introdução. PR #1259 by @marcosmmb.
- Allow using Unicode in MkDocs for translations. PR #1419.
- Add translation to Spanish for Advanced User Guide - Intro - Guía de Usuario Avanzada - Introducción. PR #1250 by @jfunez.
- Add translation to Portuguese for History, Design and Future - História, Design e Futuro. PR #1249 by @marcosmmb.
- Add translation to Portuguese for Features - Recursos. PR #1248 by @marcosmmb.
- Add translation to Spanish for Tutorial - User Guide - Intro - Tutorial - Guía de Usuario - Introducción. PR #1244 by @MartinEliasQ.
- Add translation to Chinese for Deployment - 部署. PR #1203 by @RunningIkkyu.
- Add translation to Chinese for Tutorial - User Guide - Intro - 教程 - 用户指南 - 简介. PR #1202 by @waynerv.
- Add translation to Chinese for Features - 特性. PR #1192 by @Dustyposa.
- Add translation for main page to Chinese PR #1191 by @waynerv.
- Update docs for project generation. PR #1287.
- Add Spanish translation for Introducción a los Tipos de Python (Python Types Intro). PR #1237 by @mariacamilagl.
- Add Spanish translation for Características (Features). PR #1220 by @mariacamilagl.
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
- Fix grammatical mistakes in async docs. PR #1188 by @mickeypash.
- Add support for
response_model_exclude_defaults
andresponse_model_exclude_none
: - Add example about Testing a Database. Initial PR #1144 by @duganchen.
- Update docs for Development - Contributing: Translations including note about reviewing translation PRs. #1215.
- Update log style in README.md for GitHub Markdown compatibility. PR #1200 by #geekgao.
- Add Python venv
env
to.gitignore
. PR #1212 by @cassiobotaro. - Start Portuguese translations. PR #1210 by @cassiobotaro.
- Update docs for Pydantic’s
Settings
using a dependency with@lru_cache()
. PR #1214. - Add first translation to Spanish FastAPI. PR #1201 by @mariacamilagl.
- Add docs about Settings and Environment Variables. Initial PR 1118 by @alexmitelman.
0.53.2
- Fix automatic embedding of body fields for dependencies and sub-dependencies. Original PR #1079 by @Toad2186.
- Fix dependency overrides in WebSocket testing. PR #1122 by @amitlissack.
- Fix docs script to ensure languages are always sorted. PR #1189.
- Start translations for Chinese. PR #1187 by @RunningIkkyu.
- Add docs for Schema Extra - Example. PR #1185.
0.53.1
- Fix included example after translations refactor. PR #1182.
- Add docs example for
example
inField
. Docs at Body - Fields: JSON Schema extras. PR #1106 by @JohnPaton. - Fix using recursive models in
response_model
. PR #1164 by @voegtlel. - Add docs for Pycharm Debugging. PR #1096 by @youngquan.
- Fix typo in docs. PR #1148 by @PLNech.
- Update Windows development environment instructions. PR #1179.
0.53.0
- Update test coverage badge. PR #1175.
- Add
orjson
topip install fastapi[all]
. PR #1161 by @michael0liver. - Fix included example for
GZipMiddleware
. PR #1138 by @arimbr. - Fix class name in docstring for
OAuth2PasswordRequestFormStrict
. PR #1126 by @adg-mh. - Clarify function name in example in docs. PR #1121 by @tmsick.
- Add external link Apache Kafka producer and consumer with FastAPI and aiokafka to docs. PR #1112 by @iwpnd.
- Fix serialization when using
by_alias
orexclude_unset
and returning data with Pydantic models. PR #1074 by @juhovh-aiven. - Add Gitter chat to docs. PR #1061 by @aakashnand.
- Update and simplify translations docs. PR #1171.
- Update development of FastAPI docs, set address to
127.0.0.1
to improve Windows support. PR #1169 by @mariacamilagl. - Add support for docs translations. New docs: Development - Contributing: Docs: Translations. PR #1168.
- Update terminal styles in docs and add note about Typer, the FastAPI of CLIs. PR #1139.
0.52.0
- Add new high-performance JSON response class using
orjson
. New docs: Custom Response - HTML, Stream, File, others:ORJSONResponse
. PR #1065.
0.51.0
- Re-export utils from Starlette:
- This allows using things like
from fastapi.responses import JSONResponse
instead offrom starlette.responses import JSONResponse
. - It’s mainly syntax sugar, a convenience for developer experience.
- Now
Request
,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.
- This allows using things like
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
- Fix links in release notes. PR #1052 by @sattosan.
- Fix typo in release notes. PR #1051 by @sattosan.
- Refactor/clarify
serialize_response
parameter name to avoid confusion. PR #1031 by @patrickmckenna. - Refactor calling each a path operation’s handler function in an isolated function, to simplify profiling. PR #1027 by @sm-Fifteen.
- Add missing dependencies for testing. PR #1026 by @sm-Fifteen.
- Fix accepting valid types for response models, including Python types like
List[int]
. PR #1017 by @patrickmckenna. - Fix format in SQL tutorial. PR #1015 by @vegarsti.
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
- Fix encoding of
pathlib
paths injsonable_encoder
. PR #978 by @patrickmckenna. - Add articles to External Links: PythonのWeb frameworkのパフォーマンス比較 (Django, Flask, responder, FastAPI, japronto) and [FastAPI] Python製のASGI Web フレームワーク FastAPIに入門する. PR #974 by @tokusumi.
- Fix broken links in docs. PR #949 by @tsotnikov.
- Fix small typos. PR #941 by @NikitaKolesov.
- Update and clarify docs for dependencies with
yield
. PR #986. - Add Mermaid JS support for diagrams in docs. Add first diagrams to Dependencies: First Steps and Dependencies with
yield
andHTTPException
. PR #985. - Update CI to run docs deployment in GitHub actions. PR #983.
- Allow
callable
s in path operation functions, like functions modified withfunctools.partial
. PR #977.
0.48.0
- Run linters first in tests to error out faster. PR #948.
- Log warning about
email-validator
only when used. PR #946. - Simplify Peewee docs with double dependency with
yield
. PR #947. - Add article External Links: Create and Deploy FastAPI app to Heroku. PR #942 by @windson.
- Update description of Sanic, as it is now ASGI too. PR #932 by @raphaelauv.
- Fix typo in main page. PR #920 by @mMarzeta.
- Fix parsing of possibly invalid bodies. PR #918 by @dmontagu.
- Fix typo #916 by @adursun.
- Allow
Any
type for enums in OpenAPI. PR #906 by @songzhi. - Add article to External Links: How to continuously deploy a FastAPI to AWS Lambda with AWS SAM. PR #901 by @iwpnd.
- Add note about using Body parameters without Pydantic. PR #900 by @pawamoy.
- Fix Pydantic field clone logic. PR #899 by @deuce2367.
- Fix link in middleware docs. PR #893 by @linchiwei123.
- Rename default API title from “Fast API” to “FastAPI” for consistency. PR #890.
0.47.1
- Fix model filtering in
response_model
, cloning sub-models. PR #889. - Fix FastAPI serialization of Pydantic models using ORM mode blocking the event loop. PR #888.
0.47.0
- Refactor documentation to make a simpler and shorter Tutorial - User Guide and an additional Advanced User Guide with all the additional docs. PR #887.
- Tweak external links, Markdown format, typos. PR #881.
- Fix bug in tutorial handling HTTP Basic Auth
username
andpassword
. PR #865 by @isaevpd. - Fix handling form path operation parameters declared with pure classes like
list
,tuple
, etc. PR #856 by @nsidnev. - Add request
body
toRequestValidationError
, new docs: Use theRequestValidationError
body. Initial PR #853 by @aviramha. - Update External Links with new links and dynamic GitHub projects with
fastapi
topic. PR #850. - Fix Peewee
contextvars
handling in docs: SQL (Relational) Databases with Peewee. PR #879. - Setup development environment with Python’s Venv and Flit, instead of requiring the extra Pipenv duplicating dependencies. Updated docs: Development - Contributing. PR #877.
- Update docs for HTTP Basic Auth to improve security against timing attacks. Initial PR #807 by @zwass.
0.46.0
- Fix typos and tweak configs. PR #837.
- Add link to Chinese article in External Links. PR 810 by @wxq0309.
- Implement
OAuth2AuthorizationCodeBearer
class. PR #797 by @kuwv. - Update example upgrade in docs main page. PR #795 by @cdeil.
- Fix callback handling for sub-routers. PR #792 by @jekirl.
- Fix typos. PR #784 by @kkinder.
- Add 4 Japanese articles to External Links. PR #783 by @HymanZHAN.
- Add support for subtypes of main types in
jsonable_encoder
, e.g. asyncpg’s UUIDs. PR #756 by @RmStorm. - Fix usage of Pydantic’s
HttpUrl
in docs. PR #832 by @Dustyposa. - Fix Twitter links in docs. PR #813 by @justindujardin.
- Add docs for correctly using FastAPI with Peewee ORM. Including how to overwrite parts of Peewee to correctly handle async threads. PR #789.
0.45.0
- Add support for OpenAPI Callbacks:
- New docs: OpenAPI Callbacks.
- Refactor generation of
operationId
s to be valid Python names (also valid variables in most languages). - Add
default_response_class
parameter toAPIRouter
. - Original PR #722 by @booooh.
- Refactor logging to use the same logger everywhere, update log strings and levels. PR #781.
- Add article to External Links: Почему Вы должны попробовать FastAPI?. PR #766 by @prostomarkeloff.
- Remove gender bias in docs for handling errors. PR #780. Original idea in PR #761 by @classywhetten.
- Rename docs and references to
body-schema
tobody-fields
to keep in line with Pydantic. PR #746 by @prostomarkeloff.
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. PR 749.
- Update “new issue” templates. PR #749.
- Fix serialization of errors for exotic Pydantic types. PR #748 by @dmontagu.
0.44.0
- Add GitHub action Issue Manager. PR #742.
- Fix typos in docs. PR 734 by @bundabrg.
- Fix usage of
custom_encoder
injsonable_encoder
. PR #715 by @matrixise. - Fix invalid XML example. PR 710 by @OcasoProtal.
- Fix typos and update wording in deployment docs. PR #700 by @marier-nico.
- Add note about dependencies in
APIRouter
docs. PR #698 by @marier-nico. - Add support for async class methods as dependencies #681 by @frankie567.
- Add FastAPI with Swagger UI cheatsheet to external links. PR #671 by @euri10.
- Fix typo in HTTP protocol in CORS example. PR #647 by @forestmonster.
- Add support for Pydantic versions
1.0.0
and above, with temporary (deprecated) backwards compatibility for Pydantic0.32.2
. PR #646 by @dmontagu.
0.43.0
- Update docs to reduce gender bias. PR #645 by @ticosax.
- Add docs about overriding the
operationId
for all the path operations based on their function name. PR #642 by @SKalt. - Fix validators in models generating an incorrect key order. PR #637 by @jaddison.
- Generate correct OpenAPI docs for responses with no content. PR #621 by @brotskydotcom.
- Remove
$
from Bash code blocks in docs for consistency. PR #613 by @nstapelbroek. - Add docs for self-serving docs’ (Swagger UI) static assets, e.g. to use the docs offline, or without Internet. Initial PR #557 by @svalouch.
- Fix
black
linting after upgrade. PR #682 by @frankie567.
0.42.0
- Add dependencies with
yield
, 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 with
yield
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 with
yield
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 at Dependencies with
yield
. - Updated database docs SQL (Relational) Databases: Main FastAPI app.
- PR #595.
- Fix
sitemap.xml
in website. PR #598 by @samuelcolvin.
0.41.0
- Upgrade required Starlette to
0.12.9
, the new range is>=0.12.9,<=0.12.9
.- Add
State
to FastAPI apps atapp.state
. - PR #593.
- Add
- Improve handling of custom classes for
Request
s andAPIRoute
s.- 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 of path operations.
- Process a request before passing it to a path operation function. E.g. decompressing, deserializing, etc.
- Processing a response after being generated by path 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.
- This helps to more easily solve use cases like:
- Fix preserving custom route class in routers when including other sub-routers. PR #538 by @dmontagu.
0.40.0
- Add notes to docs about installing
python-multipart
when using forms. PR #574 by @sliptonic. - Generate OpenAPI schemas in alphabetical order. PR #554 by @dmontagu.
- Add support for truncating docstrings from path operation functions.
- New docs at Advanced description from docstring.
- PR #556 by @svalouch.
- Fix
DOCTYPE
in HTML files generated for Swagger UI and ReDoc. PR #537 by @Trim21. - Fix handling
4XX
responses overriding default422
validation error responses. PR #517 by @tsouvarev. - Fix typo in documentation for Simple HTTP Basic Auth. PR #514 by @prostomarkeloff.
- Fix incorrect documentation example in first steps. PR #511 by @IgnatovFedor.
- Add support for Swagger UI initOauth settings with the parameter
swagger_ui_init_oauth
. PR #499 by @zamiramir.
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 like
user_id: str = None
that can be taken from a query parameter, but the same path 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.
- This allows declaring a parameter like
- Add support for setting a
default_response_class
in theFastAPI
instance or ininclude_router
. Initial PR #467 by @toppk. - Add support for type annotations using strings and
from __future__ import annotations
. PR #451 by @dmontagu.
0.38.1
- Fix incorrect
Request
class import. PR #493 by @kamalgill.
0.38.0
- Add recent articles to External Links and recent opinions. PR #490.
- Upgrade support range for Starlette to include
0.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 using
skip_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 in
response_model
. PR #454 by @dconathan. - Fix typo in OAuth2 JWT tutorial. PR #447 by @pablogamboa.
- Use the
media_type
parameter inBody()
params to set the media type in OpenAPI forrequestBody
. PR #439 by @divums. - Add article Deploying a scikit-learn model with ONNX and FastAPI by https://www.linkedin.com/in/nico-axtmann. PR #438 by @naxty.
- Allow setting custom
422
(validation error) response/schema in OpenAPI. - Fix using
"default"
extra response with status codes at the same time. PR #489. - Allow additional responses to use status code ranges (like
5XX
and4XX
) and"default"
. PR #435 by @divums.
0.36.0
- Fix implementation for
skip_defaults
when returning a Pydantic model. PR #422 by @dmontagu. - Fix OpenAPI generation when using the same dependency in multiple places for the same path operation. PR #417 by @dmontagu.
- Allow having empty paths in path operations used with
include_router
and aprefix
. - Fix mypy error after merging PR #415. PR #462.
0.35.0
- Fix typo in routing
assert
. PR #419 by @pablogamboa. - Fix typo in docs. PR #411 by @bronsen.
- Fix parsing a body type declared with
Union
. PR #400 by @koxudaxi.
0.34.0
Upgrade Starlette supported range to include the latest
0.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 code
limit
for example in Query Parameters. PR #366 by @Smashman.Update wording in docs about OAuth2 scopes. PR #371 by @cjw296.
Update docs for
Enum
s 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 in
prefix
of.include_router
. PR #349.Add note to docs: Include the same router multiple times with different
prefix
. 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 sameAPIRouter
multiple 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 to
0.29.0
.- New supported version range is
"pydantic >=0.28,<=0.29.0"
. - This adds support for Pydantic Generic Models, kudos to @dmontagu.
- PR #344.
- New supported version range is
0.30.1
Add section in docs about External Links and Articles. PR #341.
Remove
Pipfile.lock
from the repository as it is only used by FastAPI contributors (developers of FastAPI itself). See the PR for more details. PR #340.Update section about Help FastAPI - Get Help. PR #339.
Refine internal type declarations to improve/remove Mypy errors in users’ code. PR #338.
Update and clarify SQL tutorial with SQLAlchemy. PR #331 by @mariacamilagl.
Add SQLite online viewers to the docs. PR #330 by @cyrilbois.
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 your path 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 plain
dict
s as request bodies: Bodies of arbitrarydict
s. - New documentation about returning arbitrary
dict
s in responses: Response with arbitrarydict
. - Technical Details:
- When declaring a
response_model
it is used directly to generate the response content, from whatever was returned from the path operation function. - Before this, the return content was first passed through
jsonable_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 a
response_model
, the return object will still be passed throughjsonable_encoder
first. - When a
response_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 the
response_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.
- When declaring a
- 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.
0.29.1
Fix handling an empty-body request with a required body param. PR #311.
Fix broken link in docs: Return a Response directly. PR #306 by @dmontagu.
Fix docs discrepancy in docs for Response Model. PR #288 by @awiddersheim.
0.29.0
- Add support for declaring a
Response
parameter:- This allows declaring:
- Response Cookies.
- Response Headers.
- An HTTP Status Code different than the default: Response - Change Status Code.
- All of this while still being able to return arbitrary objects (
dict
, DB model, etc). - Update attribution to Hug, for inspiring the
response
parameter pattern. - PR #294.
- This allows declaring:
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 a path operation decorator dependency, possibly at the router level (with
.include_router()
) and then it is declared again in a specific path operation, the dependency will be called only once. - The cache can be disabled per dependency declaration, using
use_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.
- This allows using overrides/mocks of dependencies during tests.
- New docs: Testing Dependencies with Overrides.
- PR #291.
0.27.2
- Fix path and query parameters receiving
dict
as a valid type. It should be mapped to a body payload. PR #287. Updated docs at: Query parameter list / multiple values with defaults: Usinglist
.
0.27.1
Fix
auto_error=False
handling inHTTPBearer
security scheme. Do notraise
when there’s an incorrectAuthorization
header ifauto_error=False
. PR #282.Fix type declaration of
HTTPException
. PR #279.
0.27.0
Fix broken link in docs about OAuth 2.0 with scopes. PR #275 by @dmontagu.
Refactor param extraction using Pydantic
Field
:- Large refactor, improvement, and simplification of param extraction from path operations.
- Fix/add support for list query parameters with list defaults. New documentation: Query parameter list / multiple values with defaults.
- Add support for enumerations in path operation parameters. New documentation: Path Parameters: Predefined values.
- Add support for type annotations using
Optional
as inparam: Optional[str] = None
. New documentation: Optional type declarations. - PR #278.
0.26.0
Separate error handling for validation errors.
- This will allow developers to customize the exception handlers.
- Document better how to handle exceptions and use error handlers.
- Include
RequestValidationError
andWebSocketRequestValidationError
(this last one will be useful once encode/starlette#527 or equivalent is merged). - New documentation about exceptions handlers:
- PR #273.
Fix support for paths in path parameters without needing explicit
Path(...)
.- PR #256.
- Documented in PR #272 by @wshayes.
- New documentation at: Path Parameters containing paths.
Update docs for testing FastAPI. Include using
POST
, sending JSON, testing headers, etc. New documentation: Testing. PR #271.Fix type declaration of
response_model
to allow generic Python types asList[Model]
. Mainly to fixmypy
for users. PR #266.
0.25.0
Add support for Pydantic’s
include
,exclude
,by_alias
.- Update documentation: Response Model.
- Add docs for: Body - updates, using Pydantic’s
skip_defaults
. - Add method consistency tests.
- PR #264.
Add
CONTRIBUTING.md
file to GitHub, to help new contributors. PR #255 by @wshayes.Add support for Pydantic’s
skip_defaults
:- There’s a new path operation decorator parameter
response_model_skip_defaults
.- The name of the parameter will most probably change in a future version to
response_skip_defaults
,model_skip_defaults
or something similar.
- The name of the parameter will most probably change in a future version to
- New documentation section about using
response_model_skip_defaults
. - PR #248 by @wshayes.
- There’s a new path operation decorator parameter
0.24.0
Add support for WebSockets with dependencies and parameters.
- Support included for:
Depends
Security
Cookie
Header
Path
Query
- …as these are compatible with the WebSockets protocol (e.g.
Body
is not).
- Updated documentation for WebSockets.
- PR #178 by @jekirl.
- Support included for:
Upgrade the compatible version of Pydantic to
0.26.0
.
0.23.0
Upgrade the compatible version of Starlette to
0.12.0
.- This includes support for ASGI 3 (the latest version of the standard).
- It’s now possible to use Starlette’s
StreamingResponse
with iterators, like file-like objects (as those returned byopen()
). - It’s now possible to use the low level utility
iterate_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 be
http://localhost:8000/docs/oauth2-redirect
. - Have in mind that this callback URL is independent of whichever one is used by your frontend. You might also have another callback at
https://yourdomain.com/login/callback
. - This is only to allow delegated authentication in the API docs with Swagger UI.
- PR #198 by @steinitzu.
- For example, during development, it could be
Make Swagger UI and ReDoc route handlers (path operations) be
async
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 for
dependencies
parameter:- A parameter in path operation decorators, for dependencies that should be executed but the return value is not important or not used in the path operation function.
- A parameter in the
.include_router()
method of FastAPI applications and routers, to include dependencies that should be executed in each path operation in a router.- This is useful, for example, to require authentication or permissions in specific group of path operations.
- Different
dependencies
can be applied to different routers.
- These
dependencies
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 in path operation decorators, and then the ones declared in normal parameters. They are all combined and executed.
- All this also supports using
Security
withscopes
in thosedependencies
parameters, for more advanced OAuth 2.0 security scenarios with scopes. - New documentation about dependencies in path operation decorators.
- New documentation about dependencies in the
include_router()
method. - PR #235.
Fix OpenAPI documentation of Starlette URL convertors. Specially useful when using
path
convertors, to take a whole path as a parameter, like/some/url/{p:path}
. PR #234 by @euri10.Make default parameter utilities exported from
fastapi
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 scripts
test.sh
,lint.sh
, andformat.sh
. PR #232.Re-enable
black
formatting checks for Python 3.7. PR #229 by @zamiramir.
0.21.0
On body parsing errors, raise
from
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.Fix typo in routing. PR #221 by @djlambert.
0.20.1
Add typing information to package including file
py.typed
. PR #209 by @meadsteve.Add FastAPI bot for Gitter. To automatically announce new releases. PR #189.
0.20.0
Upgrade OAuth2:
- Upgrade Password flow using Bearer tokens to use the correct HTTP status code 401
UNAUTHORIZED
, withWWW-Authenticate
headers. - Update, simplify, and improve all the security docs.
- Add new
scope_str
toSecurityScopes
and update docs: OAuth2 scopes. - Update docs, images, tests.
- PR #188.
- Upgrade Password flow using Bearer tokens to use the correct HTTP status code 401
Include Hypercorn as an alternative ASGI server in the docs. PR #187.
Add docs for Static Files and Templates. PR #186.
Add docs for handling Response Cookies and Response Headers. PR #185.
0.19.0
Rename path operation decorator parameter
content_type
toresponse_class
. PR #183.Add docs:
- How to use the
jsonable_encoder
in JSON compatible encoder. - How to Return a Response directly.
- Update how to use a Custom Response Class.
- PR #184.
- How to use the
0.18.0
Add docs for HTTP 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 for Middleware. PR #173.
0.17.0
Make Flit publish from CI. PR #170.
Add documentation about handling CORS (Cross-Origin Resource Sharing). PR #169.
By default, encode by alias. This allows using Pydantic
alias
parameters working by default. PR #168.
0.16.0
Upgrade path operation
docstring
parsing to support proper Markdown descriptions. New documentation at Path Operation Configuration. PR #163.Refactor internal usage of Pydantic to use correct data types. PR #164.
Fix typo in Tutorial about Extra Models. PR #159 by @danielmichaels.
Fix Query Parameters URL examples in docs. PR #157 by @hayata-yamamoto.
0.15.0
Add support for multiple file uploads (as a single form field). New docs at: Multiple file uploads. PR #158.
Add docs for: Additional Status Codes. PR #156.
0.14.0
Improve automatically generated names of path operations in OpenAPI (in API docs). A function
read_items
instead of having a generated name “Read Items Get” will have “Read Items”. PR #155.Add docs for: Testing FastAPI. PR #151.
Update
/docs
Swagger UI to enable deep linking. This allows sharing the URL pointing directly to the path 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 with
SecurityScopes
:SecurityScopes
can be declared as a parameter likeRequest
, to get the scopes of all super-dependencies/dependants.- Improve
Security
handling, merging scopes when declaringSecurityScopes
. - Allow using
SecurityBase
(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 additional
responses
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 additional
responses
parameter to path operation decorators to extend responses in OpenAPI (and API docs).- It also allows extending existing responses generated from
response_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.
- It also allows extending existing responses generated from
- Update
scripts/test-cov-html.sh
to allow passing extra parameters like-vv
, for development.
0.11.0
Add
auto_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.Update SQL Tutorial to close database sessions even when there are exceptions. PR #89 by @alexiri.
Fix duplicate dependency in
pyproject.toml
. PR #128 by @zxalif.
0.10.3
Add Gitter chat, badge, links, etc. https://gitter.im/tiangolo/fastapi . PR #117.
Add docs about Extending OpenAPI. PR #126.
Make Travis run Ubuntu Xenial (newer version) and Python 3.7 instead of Python 3.7-dev. PR #92 by @blueyed.
Fix duplicated param variable creation. PR #123 by @yihuang.
Add note in Response Model docs about why using a function parameter instead of a function return type annotation. PR #109 by @JHSaunders.
Fix event docs (startup/shutdown) function name. PR #105 by @stratosgear.
0.10.2
Fix OpenAPI (JSON Schema) for declarations of Python
Union
(JSON SchemaadditionalProperties
). PR #121.Update Background Tasks with a note on Celery.
Document response models using unions and lists, updated at: Extra Models. PR #108.
0.10.1
- Add docs and tests for encode/databases. New docs at: Async SQL (Relational) Databases. PR #107.
0.10.0
Add support for Background Tasks in path operation functions and dependencies. New documentation about Background Tasks is here. PR #103.
Add support for
.websocket_route()
inAPIRouter
. PR #100 by @euri10.New docs section about Events: startup - shutdown. PR #99.
0.9.1
- Document receiving Multiple values with the same query parameter and Duplicate headers. PR #95.
0.9.0
Upgrade compatible Pydantic version to
0.21.0
. PR #90.Add documentation for: Application Configuration.
Fix typo in docs. PR #76 by @matthewhegarty.
Fix link in “Deployment” to “Bigger Applications”.
0.8.0
Add support for adding
tags
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.Update
isort
imports and scripts to be compatible with newer versions. PR #75.
0.7.1
Update technical details about
async def
handling with respect to previous frameworks. PR #64 by @haizaar.Add deployment documentation for Docker in Raspberry Pi and other architectures.
Trigger Docker images build on Travis CI automatically. PR #65.
0.7.0
- Add support for
UploadFile
inFile
parameter annotations.- This includes a file-like interface.
- Here’s the updated documentation for declaring
File
parameters withUploadFile
. - And here’s the updated documentation for using
Form
parameters mixed withFile
parameters, supportingbytes
andUploadFile
at the same time. - PR #63.
0.6.4
Add technical details about
async def
handling to docs. PR #61.Add docs for Debugging FastAPI applications in editors.
Fix typos in docs.
Add section about History, Design and Future.
Add docs for using WebSockets with FastAPI. PR #62.
0.6.3
- Add Favicons to docs. PR #53.
0.6.2
Introduce new project generator based on FastAPI and PostgreSQL: https://github.com/tiangolo/full-stack-fastapi-postgresql. PR #52.
Update SQL tutorial with SQLAlchemy, using
Depends
to improve editor support and reduce code repetition. PR #52.Improve middleware naming in tutorial for SQL with SQLAlchemy https://fastapi.tiangolo.com/tutorial/sql-databases/.
0.6.1
- Add docs for GraphQL: https://fastapi.tiangolo.com/advanced/graphql/. PR #48.
0.6.0
Update SQL with SQLAlchemy tutorial at https://fastapi.tiangolo.com/tutorial/sql-databases/ using the new official
request.state
. PR #45.Upgrade Starlette to version
0.11.1
and add required compatibility changes. PR #44.
0.5.1
Add section about helping and getting help with FastAPI.
Add note about path operations order in docs.
Update section about error handling with more information and make relation with Starlette error handling utilities more explicit. PR #41.
0.5.0
Add new
HTTPException
with support for custom headers. With new documentation for handling errors at: https://fastapi.tiangolo.com/tutorial/handling-errors/. PR #35.Add documentation to use Starlette
Request
object directly. Check #25 by @euri10.Add issue templates to simplify reporting bugs, getting help, etc: #34.
Update example for the SQLAlchemy tutorial at https://fastapi.tiangolo.com/tutorial/sql-databases/ using middleware and database session attached to request.
0.4.0
Add
openapi_prefix
, support for reverse proxy and mounting sub-applications. See the docs at https://fastapi.tiangolo.com/advanced/sub-applications-proxy/: #26 by @kabirkhan.Update docs/tutorial for SQLAlchemy including note about DB Browser for SQLite.
0.3.0
- Fix/add SQLAlchemy support, including ORM, and update docs for SQLAlchemy: #30.
0.2.1
- Fix
jsonable_encoder
for Pydantic models withConfig
but withoutjson_encoders
: #29.