Changelogs » Fastapi

Fastapi

0.55.1

* Fix handling of enums with their own schema in path parameters. To support [samuelcolvin/pydantic1432](https://github.com/samuelcolvin/pydantic/pull/1432) in FastAPI. PR [1463](https://github.com/tiangolo/fastapi/pull/1463).

0.55.0

* Allow enums to allow them to have their own schemas in OpenAPI. To support [samuelcolvin/pydantic1432](https://github.com/samuelcolvin/pydantic/pull/1432) in FastAPI. PR [1461](https://github.com/tiangolo/fastapi/pull/1461).
* Add links for funding through [GitHub sponsors](https://github.com/sponsors/tiangolo). PR [1425](https://github.com/tiangolo/fastapi/pull/1425).
* Update issue template for for questions. PR [1344](https://github.com/tiangolo/fastapi/pull/1344) by [retnikt](https://github.com/retnikt).
* Update warning about storing passwords in docs. PR [1336](https://github.com/tiangolo/fastapi/pull/1336) by [skorokithakis](https://github.com/skorokithakis).
* Fix typo. PR [1326](https://github.com/tiangolo/fastapi/pull/1326) by [chenl](https://github.com/chenl).
* Add translation to Portuguese for [Alternatives, Inspiration and Comparisons - Alternativas, Inspiração e Comparações](https://fastapi.tiangolo.com/pt/alternatives/). PR [1325](https://github.com/tiangolo/fastapi/pull/1325) by [Serrones](https://github.com/Serrones).
* Fix 2 typos in docs. PR [1324](https://github.com/tiangolo/fastapi/pull/1324) by [waynerv](https://github.com/waynerv).
* Update CORS docs, fix correct default of `max_age=600`. PR [1301](https://github.com/tiangolo/fastapi/pull/1301) by [derekbekoe](https://github.com/derekbekoe).
* Add translation of [main page to Portuguese](https://fastapi.tiangolo.com/pt/). PR [1300](https://github.com/tiangolo/fastapi/pull/1300) by [Serrones](https://github.com/Serrones).
* Re-word and clarify docs for extra info in fields. PR [1299](https://github.com/tiangolo/fastapi/pull/1299) by [chris-allnutt](https://github.com/chris-allnutt).
* Make sure the `*` in short features in the docs is consistent (after `.`) in all languages. PR [1424](https://github.com/tiangolo/fastapi/pull/1424).
* Update order of execution for `get_db` in SQLAlchemy tutorial. PR [1293](https://github.com/tiangolo/fastapi/pull/1293) by [bcb](https://github.com/bcb).
* Fix typos in Async docs. PR [1423](https://github.com/tiangolo/fastapi/pull/1423).

0.54.2

* Add translation to Spanish for [Concurrency and async / await - Concurrencia y async / await](https://fastapi.tiangolo.com/es/async/). PR [1290](https://github.com/tiangolo/fastapi/pull/1290) by [alvaropernas](https://github.com/alvaropernas).
* Remove obsolete vote link. PR [1289](https://github.com/tiangolo/fastapi/pull/1289) by [donhui](https://github.com/donhui).
* Allow disabling docs UIs by just disabling OpenAPI with `openapi_url=None`. New example in docs: [Advanced: Conditional OpenAPI](https://fastapi.tiangolo.com/advanced/conditional-openapi/). PR [1421](https://github.com/tiangolo/fastapi/pull/1421).
* Add translation to Portuguese for [Benchmarks - Comparações](https://fastapi.tiangolo.com/pt/benchmarks/). PR [1274](https://github.com/tiangolo/fastapi/pull/1274) by [Serrones](https://github.com/Serrones).
* Add translation to Portuguese for [Tutorial - User Guide - Intro - Tutorial - Guia de Usuário - Introdução](https://fastapi.tiangolo.com/pt/tutorial/). PR [1259](https://github.com/tiangolo/fastapi/pull/1259) by [marcosmmb](https://github.com/marcosmmb).
* Allow using Unicode in MkDocs for translations. PR [1419](https://github.com/tiangolo/fastapi/pull/1419).
* Add translation to Spanish for [Advanced User Guide - Intro - Guía de Usuario Avanzada - Introducción](https://fastapi.tiangolo.com/es/advanced/). PR [1250](https://github.com/tiangolo/fastapi/pull/1250) by [jfunez](https://github.com/jfunez).
* Add translation to Portuguese for [History, Design and Future - História, Design e Futuro](https://fastapi.tiangolo.com/pt/history-design-future/). PR [1249](https://github.com/tiangolo/fastapi/pull/1249) by [marcosmmb](https://github.com/marcosmmb).
* Add translation to Portuguese for [Features - Recursos](https://fastapi.tiangolo.com/pt/features/). PR [1248](https://github.com/tiangolo/fastapi/pull/1248) by [marcosmmb](https://github.com/marcosmmb).
* Add translation to Spanish for [Tutorial - User Guide - Intro - Tutorial - Guía de Usuario - Introducción](https://fastapi.tiangolo.com/es/tutorial/). PR [1244](https://github.com/tiangolo/fastapi/pull/1244) by [MartinEliasQ](https://github.com/MartinEliasQ).
* Add translation to Chinese for [Deployment - 部署](https://fastapi.tiangolo.com/zh/deployment/). PR [1203](https://github.com/tiangolo/fastapi/pull/1203) by [RunningIkkyu](https://github.com/RunningIkkyu).
* Add translation to Chinese for [Tutorial - User Guide - Intro - 教程 - 用户指南 - 简介](https://fastapi.tiangolo.com/zh/tutorial/). PR [1202](https://github.com/tiangolo/fastapi/pull/1202) by [waynerv](https://github.com/waynerv).
* Add translation to Chinese for [Features - 特性](https://fastapi.tiangolo.com/zh/features/). PR [1192](https://github.com/tiangolo/fastapi/pull/1192) by [Dustyposa](https://github.com/Dustyposa).
* Add translation for [main page to Chinese](https://fastapi.tiangolo.com/zh/) PR [1191](https://github.com/tiangolo/fastapi/pull/1191) by [waynerv](https://github.com/waynerv).
* Update docs for project generation. PR [1287](https://github.com/tiangolo/fastapi/pull/1287).
* Add Spanish translation for [Introducción a los Tipos de Python (Python Types Intro)](https://fastapi.tiangolo.com/es/python-types/). PR [1237](https://github.com/tiangolo/fastapi/pull/1237) by [mariacamilagl](https://github.com/mariacamilagl).
* Add Spanish translation for [Características (Features)](https://fastapi.tiangolo.com/es/features/). PR [1220](https://github.com/tiangolo/fastapi/pull/1220) by [mariacamilagl](https://github.com/mariacamilagl).

0.54.1

* Update database test setup. PR [1226](https://github.com/tiangolo/fastapi/pull/1226).
* Improve test debugging by showing response text in failing tests. PR [1222](https://github.com/tiangolo/fastapi/pull/1222) by [samuelcolvin](https://github.com/samuelcolvin).

0.54.0

* Fix grammatical mistakes in async docs. PR [1188](https://github.com/tiangolo/fastapi/pull/1188) by [mickeypash](https://github.com/mickeypash).
* Add support for `response_model_exclude_defaults` and `response_model_exclude_none`:
* Deprecate the parameter `include_none` in `jsonable_encoder` and add the inverted `exclude_none`, to keep in sync with Pydantic.
* PR [1166](https://github.com/tiangolo/fastapi/pull/1166) by [voegtlel](https://github.com/voegtlel).
* Add example about [Testing a Database](https://fastapi.tiangolo.com/advanced/testing-database/). Initial PR [1144](https://github.com/tiangolo/fastapi/pull/1144) by [duganchen](https://github.com/duganchen).
* Update docs for [Development - Contributing: Translations](https://fastapi.tiangolo.com/contributing/translations) including note about reviewing translation PRs. [1215](https://github.com/tiangolo/fastapi/pull/1215).
* Update log style in README.md for GitHub Markdown compatibility. PR [1200](https://github.com/tiangolo/fastapi/pull/1200) by [geekgao](https://github.com/geekgao).
* Add Python venv `env` to `.gitignore`. PR [1212](https://github.com/tiangolo/fastapi/pull/1212) by [cassiobotaro](https://github.com/cassiobotaro).
* Start Portuguese translations. PR [1210](https://github.com/tiangolo/fastapi/pull/1210) by [cassiobotaro](https://github.com/cassiobotaro).
* Update docs for Pydantic's `Settings` using a dependency with `lru_cache()`. PR [1214](https://github.com/tiangolo/fastapi/pull/1214).
* Add first translation to Spanish [FastAPI](https://fastapi.tiangolo.com/es/). PR [1201](https://github.com/tiangolo/fastapi/pull/1201) by [mariacamilagl](https://github.com/mariacamilagl).
* Add docs about [Settings and Environment Variables](https://fastapi.tiangolo.com/advanced/settings/). Initial PR [1118](https://github.com/tiangolo/fastapi/pull/1118) by [alexmitelman](https://github.com/alexmitelman).

0.53.2

* Fix automatic embedding of body fields for dependencies and sub-dependencies. Original PR [1079](https://github.com/tiangolo/fastapi/pull/1079) by [Toad2186](https://github.com/Toad2186).
* Fix dependency overrides in WebSocket testing. PR [1122](https://github.com/tiangolo/fastapi/pull/1122) by [amitlissack](https://github.com/amitlissack).
* Fix docs script to ensure languages are always sorted. PR [1189](https://github.com/tiangolo/fastapi/pull/1189).
* Start translations for Chinese. PR [1187](https://github.com/tiangolo/fastapi/pull/1187) by [RunningIkkyu](https://github.com/RunningIkkyu).
* Add docs for [Schema Extra - Example](https://fastapi.tiangolo.com/tutorial/schema-extra-example/). PR [1185](https://github.com/tiangolo/fastapi/pull/1185).

0.53.1

* Fix included example after translations refactor. PR [1182](https://github.com/tiangolo/fastapi/pull/1182).
* Add docs example for `example` in `Field`. Docs at [Body - Fields: JSON Schema extras](https://fastapi.tiangolo.com/tutorial/body-fields/json-schema-extras). PR [1106](https://github.com/tiangolo/fastapi/pull/1106) by [JohnPaton](https://github.com/JohnPaton).
* Fix using recursive models in `response_model`. PR [1164](https://github.com/tiangolo/fastapi/pull/1164) by [voegtlel](https://github.com/voegtlel).
* Add docs for [Pycharm Debugging](https://fastapi.tiangolo.com/tutorial/debugging/). PR [1096](https://github.com/tiangolo/fastapi/pull/1096) by [youngquan](https://github.com/youngquan).
* Fix typo in docs. PR [1148](https://github.com/tiangolo/fastapi/pull/1148) by [PLNech](https://github.com/PLNech).
* Update Windows development environment instructions. PR [1179](https://github.com/tiangolo/fastapi/pull/1179).

0.53.0

* Update test coverage badge. PR [1175](https://github.com/tiangolo/fastapi/pull/1175).
* Add `orjson` to `pip install fastapi[all]`. PR [1161](https://github.com/tiangolo/fastapi/pull/1161) by [michael0liver](https://github.com/michael0liver).
* Fix included example for `GZipMiddleware`. PR [1138](https://github.com/tiangolo/fastapi/pull/1138) by [arimbr](https://github.com/arimbr).
* Fix class name in docstring for `OAuth2PasswordRequestFormStrict`. PR [1126](https://github.com/tiangolo/fastapi/pull/1126) by [adg-mh](https://github.com/adg-mh).
* Clarify function name in example in docs. PR [1121](https://github.com/tiangolo/fastapi/pull/1121) by [tmsick](https://github.com/tmsick).
* Add external link [Apache Kafka producer and consumer with FastAPI and aiokafka](https://iwpnd.pw/articles/2020-03/apache-kafka-fastapi-geostream) to docs. PR [1112](https://github.com/tiangolo/fastapi/pull/1112) by [iwpnd](https://github.com/iwpnd).
* Fix serialization when using `by_alias` or `exclude_unset` and returning data with Pydantic models. PR [1074](https://github.com/tiangolo/fastapi/pull/1074) by [juhovh-aiven](https://github.com/juhovh-aiven).
* Add Gitter chat to docs. PR [1061](https://github.com/tiangolo/fastapi/pull/1061) by [aakashnand](https://github.com/aakashnand).
* Update and simplify translations docs. PR [1171](https://github.com/tiangolo/fastapi/pull/1171).
* Update development of FastAPI docs, set address to `127.0.0.1` to improve Windows support. PR [1169](https://github.com/tiangolo/fastapi/pull/1169) by [mariacamilagl](https://github.com/mariacamilagl).
* Add support for docs translations. New docs: [Development - Contributing: Docs: Translations](https://fastapi.tiangolo.com/contributing/translations). PR [1168](https://github.com/tiangolo/fastapi/pull/1168).
* Update terminal styles in docs and add note about [**Typer**, the FastAPI of CLIs](https://typer.tiangolo.com/). PR [1139](https://github.com/tiangolo/fastapi/pull/1139).

0.52.0

* Add new high-performance JSON response class using `orjson`. New docs: [Custom Response - HTML, Stream, File, others: `ORJSONResponse`](https://fastapi.tiangolo.com/advanced/custom-response/use-orjsonresponse). PR [1065](https://github.com/tiangolo/fastapi/pull/1065).

0.51.0

* Re-export utils from Starlette:
* This allows using things like `from fastapi.responses import JSONResponse` instead of `from starlette.responses import JSONResponse`.
* It's mainly syntax sugar, a convenience for developer experience.
* Now `Request`, `Response`, `WebSocket`, `status` can be imported directly from `fastapi` as in `from 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:
* [Custom Response - HTML, Stream, File, others](https://fastapi.tiangolo.com/advanced/custom-response/).
* [Advanced Middleware](https://fastapi.tiangolo.com/advanced/middleware/).
* [Including WSGI - Flask, Django, others](https://fastapi.tiangolo.com/advanced/wsgi/).
* PR [1064](https://github.com/tiangolo/fastapi/pull/1064).

0.50.0

* Add link to Release Notes from docs about pinning versions for deployment. PR [1058](https://github.com/tiangolo/fastapi/pull/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](https://github.com/tiangolo/fastapi/pull/1057).
* Add docs about pinning FastAPI versions for deployment: [Deployment: FastAPI versions](https://fastapi.tiangolo.com/deployment/fastapi-versions). PR [1056](https://github.com/tiangolo/fastapi/pull/1056).

0.49.2

* Fix links in release notes. PR [1052](https://github.com/tiangolo/fastapi/pull/1052) by [sattosan](https://github.com/sattosan).
* Fix typo in release notes. PR [1051](https://github.com/tiangolo/fastapi/pull/1051) by [sattosan](https://github.com/sattosan).
* Refactor/clarify `serialize_response` parameter name to avoid confusion. PR [1031](https://github.com/tiangolo/fastapi/pull/1031) by [patrickmckenna](https://github.com/patrickmckenna).
* Refactor calling each a path operation's handler function in an isolated function, to simplify profiling. PR [1027](https://github.com/tiangolo/fastapi/pull/1027) by [sm-Fifteen](https://github.com/sm-Fifteen).
* Add missing dependencies for testing. PR [1026](https://github.com/tiangolo/fastapi/pull/1026) by [sm-Fifteen](https://github.com/sm-Fifteen).
* Fix accepting valid types for response models, including Python types like `List[int]`. PR [1017](https://github.com/tiangolo/fastapi/pull/1017) by [patrickmckenna](https://github.com/patrickmckenna).
* Fix format in SQL tutorial. PR [1015](https://github.com/tiangolo/fastapi/pull/1015) by [vegarsti](https://github.com/vegarsti).

0.49.1

* Fix path operation duplicated parameters when used in dependencies and the path operation function. PR [994](https://github.com/tiangolo/fastapi/pull/994) by [merowinger92](https://github.com/merowinger92).
* Update Netlify previews deployment GitHub action as the fix is already merged and there's a new release. PR [1047](https://github.com/tiangolo/fastapi/pull/1047).
* Move mypy configurations to config file. PR [987](https://github.com/tiangolo/fastapi/pull/987) by [hukkinj1](https://github.com/hukkinj1).
* Temporary fix to Netlify previews not deployable from PRs from forks. PR [1046](https://github.com/tiangolo/fastapi/pull/1046) by [mariacamilagl](https://github.com/mariacamilagl).

0.49.0

* Fix encoding of `pathlib` paths in `jsonable_encoder`. PR [978](https://github.com/tiangolo/fastapi/pull/978) by [patrickmckenna](https://github.com/patrickmckenna).
* Add articles to [External Links](https://fastapi.tiangolo.com/external-links/): [PythonのWeb frameworkのパフォーマンス比較 (Django, Flask, responder, FastAPI, japronto)](https://qiita.com/bee2/items/0ad260ab9835a2087dae) and [[FastAPI] Python製のASGI Web フレームワーク FastAPIに入門する](https://qiita.com/bee2/items/75d9c0d7ba20e7a4a0e9). PR [974](https://github.com/tiangolo/fastapi/pull/974) by [tokusumi](https://github.com/tokusumi).
* Fix broken links in docs. PR [949](https://github.com/tiangolo/fastapi/pull/949) by [tsotnikov](https://github.com/tsotnikov).
* Fix small typos. PR [941](https://github.com/tiangolo/fastapi/pull/941) by [NikitaKolesov](https://github.com/NikitaKolesov).
* Update and clarify docs for dependencies with `yield`. PR [986](https://github.com/tiangolo/fastapi/pull/986).
* Add Mermaid JS support for diagrams in docs. Add first diagrams to [Dependencies: First Steps](https://fastapi.tiangolo.com/tutorial/dependencies/) and [Dependencies with `yield` and `HTTPException`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/dependencies-with-yield-and-httpexception). PR [985](https://github.com/tiangolo/fastapi/pull/985).
* Update CI to run docs deployment in GitHub actions. PR [983](https://github.com/tiangolo/fastapi/pull/983).
* Allow `callable`s in *path operation functions*, like functions modified with `functools.partial`. PR [977](https://github.com/tiangolo/fastapi/pull/977).

0.48.0

* Run linters first in tests to error out faster. PR [948](https://github.com/tiangolo/fastapi/pull/948).
* Log warning about `email-validator` only when used. PR [946](https://github.com/tiangolo/fastapi/pull/946).
* Simplify [Peewee docs](https://fastapi.tiangolo.com/advanced/sql-databases-peewee/) with double dependency with `yield`. PR [947](https://github.com/tiangolo/fastapi/pull/947).
* Add article [External Links](https://fastapi.tiangolo.com/external-links/): [Create and Deploy FastAPI app to Heroku](https://www.tutlinks.com/create-and-deploy-fastapi-app-to-heroku/). PR [942](https://github.com/tiangolo/fastapi/pull/942) by [windson](https://github.com/windson).
* Update description of Sanic, as it is now ASGI too. PR [932](https://github.com/tiangolo/fastapi/pull/932) by [raphaelauv](https://github.com/raphaelauv).
* Fix typo in main page. PR [920](https://github.com/tiangolo/fastapi/pull/920) by [mMarzeta](https://github.com/mMarzeta).
* Fix parsing of possibly invalid bodies. PR [918](https://github.com/tiangolo/fastapi/pull/918) by [dmontagu](https://github.com/dmontagu).
* Fix typo [916](https://github.com/tiangolo/fastapi/pull/916) by [adursun](https://github.com/adursun).
* Allow `Any` type for enums in OpenAPI. PR [906](https://github.com/tiangolo/fastapi/pull/906) by [songzhi](https://github.com/songzhi).
* Add article to [External Links](https://fastapi.tiangolo.com/external-links/): [How to continuously deploy a FastAPI to AWS Lambda with AWS SAM](https://iwpnd.pw/articles/2020-01/deploy-fastapi-to-aws-lambda). PR [901](https://github.com/tiangolo/fastapi/pull/901) by [iwpnd](https://github.com/iwpnd).
* Add note about using Body parameters without Pydantic. PR [900](https://github.com/tiangolo/fastapi/pull/900) by [pawamoy](https://github.com/pawamoy).
* Fix Pydantic field clone logic. PR [899](https://github.com/tiangolo/fastapi/pull/899) by [deuce2367](https://github.com/deuce2367).
* Fix link in middleware docs. PR [893](https://github.com/tiangolo/fastapi/pull/893) by [linchiwei123](https://github.com/linchiwei123).
* Rename default API title from "Fast API" to "FastAPI" for consistency. PR [890](https://github.com/tiangolo/fastapi/pull/890).

0.47.1

* Fix model filtering in `response_model`, cloning sub-models. PR [889](https://github.com/tiangolo/fastapi/pull/889).
* Fix FastAPI serialization of Pydantic models using ORM mode blocking the event loop. PR [888](https://github.com/tiangolo/fastapi/pull/888).

0.47.0

* Refactor documentation to make a simpler and shorter [Tutorial - User Guide](https://fastapi.tiangolo.com/tutorial/) and an additional [Advanced User Guide](https://fastapi.tiangolo.com/advanced/) with all the additional docs. PR [887](https://github.com/tiangolo/fastapi/pull/887).
* Tweak external links, Markdown format, typos. PR [881](https://github.com/tiangolo/fastapi/pull/881).
* Fix bug in tutorial handling HTTP Basic Auth `username` and `password`. PR [865](https://github.com/tiangolo/fastapi/pull/865) by [isaevpd](https://github.com/isaevpd).
* Fix handling form *path operation* parameters declared with pure classes like `list`, `tuple`, etc. PR [856](https://github.com/tiangolo/fastapi/pull/856) by [nsidnev](https://github.com/nsidnev).
* Add request `body` to `RequestValidationError`, new docs: [Use the `RequestValidationError` body](https://fastapi.tiangolo.com/tutorial/handling-errors/use-the-requestvalidationerror-body). Initial PR [853](https://github.com/tiangolo/fastapi/pull/853) by [aviramha](https://github.com/aviramha).
* Update [External Links](https://fastapi.tiangolo.com/external-links/) with new links and dynamic GitHub projects with `fastapi` topic. PR [850](https://github.com/tiangolo/fastapi/pull/850).
* Fix Peewee `contextvars` handling in docs: [SQL (Relational) Databases with Peewee](https://fastapi.tiangolo.com/tutorial/sql-databases-peewee/). PR [879](https://github.com/tiangolo/fastapi/pull/879).
* Setup development environment with Python's Venv and Flit, instead of requiring the extra Pipenv duplicating dependencies. Updated docs: [Development - Contributing](https://fastapi.tiangolo.com/contributing/). PR [877](https://github.com/tiangolo/fastapi/pull/877).
* Update docs for [HTTP Basic Auth](https://fastapi.tiangolo.com/tutorial/security/http-basic-auth/) to improve security against timing attacks. Initial PR [807](https://github.com/tiangolo/fastapi/pull/807) by [zwass](https://github.com/zwass).

0.46.0

* Fix typos and tweak configs. PR [837](https://github.com/tiangolo/fastapi/pull/837).
* Add link to Chinese article in [External Links](https://fastapi.tiangolo.com/external-links/). PR [810](https://github.com/tiangolo/fastapi/pull/810) by [wxq0309](https://github.com/wxq0309).
* Implement `OAuth2AuthorizationCodeBearer` class. PR [797](https://github.com/tiangolo/fastapi/pull/797) by [kuwv](https://github.com/kuwv).
* Update example upgrade in docs main page. PR [795](https://github.com/tiangolo/fastapi/pull/795) by [cdeil](https://github.com/cdeil).
* Fix callback handling for sub-routers. PR [792](https://github.com/tiangolo/fastapi/pull/792) by [jekirl](https://github.com/jekirl).
* Fix typos. PR [784](https://github.com/tiangolo/fastapi/pull/784) by [kkinder](https://github.com/kkinder).
* Add 4 Japanese articles to [External Links](https://fastapi.tiangolo.com/external-links/). PR [783](https://github.com/tiangolo/fastapi/pull/783) by [HymanZHAN](https://github.com/HymanZHAN).
* Add support for subtypes of main types in `jsonable_encoder`, e.g. asyncpg's UUIDs. PR [756](https://github.com/tiangolo/fastapi/pull/756) by [RmStorm](https://github.com/RmStorm).
* Fix usage of Pydantic's `HttpUrl` in docs. PR [832](https://github.com/tiangolo/fastapi/pull/832) by [Dustyposa](https://github.com/Dustyposa).
* Fix Twitter links in docs. PR [813](https://github.com/tiangolo/fastapi/pull/813) by [justindujardin](https://github.com/justindujardin).
* Add docs for correctly [using FastAPI with Peewee ORM](https://fastapi.tiangolo.com/tutorial/sql-databases-peewee/). Including how to overwrite parts of Peewee to correctly handle async threads. PR [789](https://github.com/tiangolo/fastapi/pull/789).

0.45.0

* Add support for OpenAPI Callbacks:
* New docs: [OpenAPI Callbacks](https://fastapi.tiangolo.com/tutorial/openapi-callbacks/).
* Refactor generation of `operationId`s to be valid Python names (also valid variables in most languages).
* Add `default_response_class` parameter to `APIRouter`.
* Original PR [722](https://github.com/tiangolo/fastapi/pull/722) by [booooh](https://github.com/booooh).
* Refactor logging to use the same logger everywhere, update log strings and levels. PR [781](https://github.com/tiangolo/fastapi/pull/781).
* Add article to [External Links](https://fastapi.tiangolo.com/external-links/): [Почему Вы должны попробовать FastAPI?](https://habr.com/ru/post/478620/). PR [766](https://github.com/tiangolo/fastapi/pull/766) by [prostomarkeloff](https://github.com/prostomarkeloff).
* Remove gender bias in docs for handling errors. PR [780](https://github.com/tiangolo/fastapi/pull/780). Original idea in PR [761](https://github.com/tiangolo/fastapi/pull/761) by [classywhetten](https://github.com/classywhetten).
* Rename docs and references to `body-schema` to `body-fields` to keep in line with Pydantic. PR [746](https://github.com/tiangolo/fastapi/pull/746) by [prostomarkeloff](https://github.com/prostomarkeloff).

0.44.1

* Add GitHub social preview images to git. PR [752](https://github.com/tiangolo/fastapi/pull/752).
* Update PyPI "trove classifiers". PR [751](https://github.com/tiangolo/fastapi/pull/751).
* Add full support for Python 3.8. Enable Python 3.8 in full in Travis. PR [749](https://github.com/tiangolo/fastapi/pull/749).
* Update "new issue" templates. PR [749](https://github.com/tiangolo/fastapi/pull/749).
* Fix serialization of errors for exotic Pydantic types. PR [748](https://github.com/tiangolo/fastapi/pull/748) by [dmontagu](https://github.com/dmontagu).

0.44.0

* Add GitHub action [Issue Manager](https://github.com/tiangolo/issue-manager). PR [742](https://github.com/tiangolo/fastapi/pull/742).
* Fix typos in docs. PR [734](https://github.com/tiangolo/fastapi/pull/734) by [bundabrg](https://github.com/bundabrg).
* Fix usage of `custom_encoder` in `jsonable_encoder`. PR [715](https://github.com/tiangolo/fastapi/pull/715) by [matrixise](https://github.com/matrixise).
* Fix invalid XML example. PR [710](https://github.com/tiangolo/fastapi/pull/710) by [OcasoProtal](https://github.com/OcasoProtal).
* Fix typos and update wording in deployment docs. PR [700](https://github.com/tiangolo/fastapi/pull/700) by [marier-nico](https://github.com/tiangolo/fastapi/pull/700).
* Add note about dependencies in `APIRouter` docs. PR [698](https://github.com/tiangolo/fastapi/pull/698) by [marier-nico](https://github.com/marier-nico).
* Add support for async class methods as dependencies [681](https://github.com/tiangolo/fastapi/pull/681) by [frankie567](https://github.com/frankie567).
* Add FastAPI with Swagger UI cheatsheet to external links. PR [671](https://github.com/tiangolo/fastapi/pull/671) by [euri10](https://github.com/euri10).
* Fix typo in HTTP protocol in CORS example. PR [647](https://github.com/tiangolo/fastapi/pull/647) by [forestmonster](https://github.com/forestmonster).
* Add support for Pydantic versions `1.0.0` and above, with temporary (deprecated) backwards compatibility for Pydantic `0.32.2`. PR [646](https://github.com/tiangolo/fastapi/pull/646) by [dmontagu](https://github.com/dmontagu).

0.43.0

* Update docs to reduce gender bias. PR [645](https://github.com/tiangolo/fastapi/pull/645) by [ticosax](https://github.com/ticosax).
* Add docs about [overriding the `operationId` for all the *path operations*](https://fastapi.tiangolo.com/tutorial/path-operation-advanced-configuration/using-the-path-operation-function-name-as-the-operationid) based on their function name. PR [642](https://github.com/tiangolo/fastapi/pull/642) by [SKalt](https://github.com/SKalt).
* Fix validators in models generating an incorrect key order. PR [637](https://github.com/tiangolo/fastapi/pull/637) by [jaddison](https://github.com/jaddison).
* Generate correct OpenAPI docs for responses with no content. PR [621](https://github.com/tiangolo/fastapi/pull/621) by [brotskydotcom](https://github.com/brotskydotcom).
* Remove `$` from Bash code blocks in docs for consistency. PR [613](https://github.com/tiangolo/fastapi/pull/613) by [nstapelbroek](https://github.com/nstapelbroek).
* Add docs for [self-serving docs' (Swagger UI) static assets](https://fastapi.tiangolo.com/tutorial/extending-openapi/self-hosting-javascript-and-css-for-docs), e.g. to use the docs offline, or without Internet. Initial PR [557](https://github.com/tiangolo/fastapi/pull/557) by [svalouch](https://github.com/svalouch).
* Fix `black` linting after upgrade. PR [682](https://github.com/tiangolo/fastapi/pull/682) by [frankie567](https://github.com/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 or `async`, **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`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/).
* Updated database docs [SQL (Relational) Databases: Main **FastAPI** app](https://fastapi.tiangolo.com/tutorial/sql-databases/main-fastapi-app).
* PR [595](https://github.com/tiangolo/fastapi/pull/595).
* Fix `sitemap.xml` in website. PR [598](https://github.com/tiangolo/fastapi/pull/598) by [samuelcolvin](https://github.com/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 at `app.state`.
* PR [593](https://github.com/tiangolo/fastapi/pull/593).
* Improve handling of custom classes for `Request`s and `APIRoute`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](https://fastapi.tiangolo.com/tutorial/custom-request-and-route/).
* PR [589](https://github.com/tiangolo/fastapi/pull/589) by [dmontagu](https://github.com/dmontagu).
* Fix preserving custom route class in routers when including other sub-routers. PR [538](https://github.com/tiangolo/fastapi/pull/538) by [dmontagu](https://github.com/dmontagu).

0.40.0

* Add notes to docs about installing `python-multipart` when using forms. PR [574](https://github.com/tiangolo/fastapi/pull/574) by [sliptonic](https://github.com/sliptonic).
* Generate OpenAPI schemas in alphabetical order. PR [554](https://github.com/tiangolo/fastapi/pull/554) by [dmontagu](https://github.com/dmontagu).
* Add support for truncating docstrings from *path operation functions*.
* New docs at [Advanced description from docstring](https://fastapi.tiangolo.com/tutorial/path-operation-advanced-configuration/advanced-description-from-docstring).
* PR [556](https://github.com/tiangolo/fastapi/pull/556) by [svalouch](https://github.com/svalouch).
* Fix `DOCTYPE` in HTML files generated for Swagger UI and ReDoc. PR [537](https://github.com/tiangolo/fastapi/pull/537) by [Trim21](https://github.com/Trim21).
* Fix handling `4XX` responses overriding default `422` validation error responses. PR [517](https://github.com/tiangolo/fastapi/pull/517) by [tsouvarev](https://github.com/tsouvarev).
* Fix typo in documentation for [Simple HTTP Basic Auth](https://fastapi.tiangolo.com/tutorial/security/http-basic-auth/simple-http-basic-auth). PR [514](https://github.com/tiangolo/fastapi/pull/514) by [prostomarkeloff](https://github.com/prostomarkeloff).
* Fix incorrect documentation example in [first steps](https://fastapi.tiangolo.com/tutorial/first-steps/). PR [511](https://github.com/tiangolo/fastapi/pull/511) by [IgnatovFedor](https://github.com/IgnatovFedor).
* Add support for Swagger UI [initOauth](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/oauth2.md) settings with the parameter `swagger_ui_init_oauth`. PR [499](https://github.com/tiangolo/fastapi/pull/499) by [zamiramir](https://github.com/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](https://github.com/tiangolo/fastapi/pull/464) by [jonathanunderwood](https://github.com/jonathanunderwood).
* Add support for setting a `default_response_class` in the `FastAPI` instance or in `include_router`. Initial PR [467](https://github.com/tiangolo/fastapi/pull/467) by [toppk](https://github.com/toppk).
* Add support for type annotations using strings and `from __future__ import annotations`. PR [451](https://github.com/tiangolo/fastapi/pull/451) by [dmontagu](https://github.com/dmontagu).

0.38.1

* Fix incorrect `Request` class import. PR [493](https://github.com/tiangolo/fastapi/pull/493) by [kamalgill](https://github.com/kamalgill).

0.38.0

* Add recent articles to [External Links](https://fastapi.tiangolo.com/external-links/) and recent opinions. PR [490](https://github.com/tiangolo/fastapi/pull/490).
* Upgrade support range for Starlette to include `0.12.8`. The new range is `>=0.11.1,<=0.12.8"`. PR [477](https://github.com/tiangolo/fastapi/pull/477) by [dmontagu](https://github.com/dmontagu).
* Upgrade support to Pydantic version 0.32.2 and update internal code to use it (breaking change). PR [463](https://github.com/tiangolo/fastapi/pull/463) by [dmontagu](https://github.com/dmontagu).

0.37.0

* Add support for custom route classes for advanced use cases. PR [468](https://github.com/tiangolo/fastapi/pull/468) by [dmontagu](https://github.com/dmontagu).
* Allow disabling Google fonts in ReDoc. PR [481](https://github.com/tiangolo/fastapi/pull/481) by [b1-luettje](https://github.com/b1-luettje).
* Fix security issue: when returning a sub-class of a response model and using `skip_defaults` it could leak information. PR [485](https://github.com/tiangolo/fastapi/pull/485) by [dmontagu](https://github.com/dmontagu).
* Enable tests for Python 3.8-dev. PR [465](https://github.com/tiangolo/fastapi/pull/465) by [Jamim](https://github.com/Jamim).
* Add support and tests for Pydantic dataclasses in `response_model`. PR [454](https://github.com/tiangolo/fastapi/pull/454) by [dconathan](https://github.com/dconathan).
* Fix typo in OAuth2 JWT tutorial. PR [447](https://github.com/tiangolo/fastapi/pull/447) by [pablogamboa](https://github.com/pablogamboa).
* Use the `media_type` parameter in `Body()` params to set the media type in OpenAPI for `requestBody`. PR [439](https://github.com/tiangolo/fastapi/pull/439) by [divums](https://github.com/divums).
* Add article [Deploying a scikit-learn model with ONNX and FastAPI](https://medium.com/nico.axtmann95/deploying-a-scikit-learn-model-with-onnx-und-fastapi-1af398268915) by [https://www.linkedin.com/in/nico-axtmann](Nico Axtmann). PR [438](https://github.com/tiangolo/fastapi/pull/438) by [naxty](https://github.com/naxty).
* Allow setting custom `422` (validation error) response/schema in OpenAPI.
* And use media type from response class instead of fixed `application/json` (the default).
* PR [437](https://github.com/tiangolo/fastapi/pull/437) by [divums](https://github.com/divums).
* Fix using `"default"` extra response with status codes at the same time. PR [489](https://github.com/tiangolo/fastapi/pull/489).
* Allow additional responses to use status code ranges (like `5XX` and `4XX`) and `"default"`. PR [435](https://github.com/tiangolo/fastapi/pull/435) by [divums](https://github.com/divums).

0.36.0 insecure

* Fix implementation for `skip_defaults` when returning a Pydantic model. PR [422](https://github.com/tiangolo/fastapi/pull/422) by [dmontagu](https://github.com/dmontagu).
* Fix OpenAPI generation when using the same dependency in multiple places for the same *path operation*. PR [417](https://github.com/tiangolo/fastapi/pull/417) by [dmontagu](https://github.com/dmontagu).
* Allow having empty paths in *path operations* used with `include_router` and a `prefix`.
* This allows having a router for `/cats` and all its *path operations*, while having one of them for `/cats`.
* Now it doesn't have to be only `/cats/` (with a trailing slash).
* To use it, declare the path in the *path operation* as the empty string (`""`).
* PR [415](https://github.com/tiangolo/fastapi/pull/415) by [vitalik](https://github.com/vitalik).
* Fix mypy error after merging PR 415. PR [462](https://github.com/tiangolo/fastapi/pull/462).