Fastapi

Latest version: v0.111.0

Safety actively analyzes 623677 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 31

0.94.0

Not secure
Upgrades

* ⬆ Upgrade python-multipart to support 0.0.6. PR [9212](https://github.com/tiangolo/fastapi/pull/9212) by [musicinmybrain](https://github.com/musicinmybrain).
* ⬆️ Upgrade Starlette version, support new `lifespan` with state. PR [9239](https://github.com/tiangolo/fastapi/pull/9239) by [tiangolo](https://github.com/tiangolo).

Docs

* 📝 Update Sentry link in docs. PR [9218](https://github.com/tiangolo/fastapi/pull/9218) by [smeubank](https://github.com/smeubank).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/history-design-future.md`. PR [5986](https://github.com/tiangolo/fastapi/pull/5986) by [Xewus](https://github.com/Xewus).

Internal

* ➕ Add `pydantic` to PyPI classifiers. PR [5914](https://github.com/tiangolo/fastapi/pull/5914) by [yezz123](https://github.com/yezz123).
* ⬆ Bump black from 22.10.0 to 23.1.0. PR [5953](https://github.com/tiangolo/fastapi/pull/5953) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump types-ujson from 5.6.0.0 to 5.7.0.1. PR [6027](https://github.com/tiangolo/fastapi/pull/6027) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ Bump dawidd6/action-download-artifact from 2.24.3 to 2.26.0. PR [6034](https://github.com/tiangolo/fastapi/pull/6034) by [dependabot[bot]](https://github.com/apps/dependabot).
* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [5709](https://github.com/tiangolo/fastapi/pull/5709) by [pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

0.93.0

Not secure
Features

* ✨ Add support for `lifespan` async context managers (superseding `startup` and `shutdown` events). Initial PR [2944](https://github.com/tiangolo/fastapi/pull/2944) by [uSpike](https://github.com/uSpike).

Now, instead of using independent `startup` and `shutdown` events, you can define that logic in a single function with `yield` decorated with `asynccontextmanager` (an async context manager).

For example:

Python
from contextlib import asynccontextmanager

from fastapi import FastAPI


def fake_answer_to_everything_ml_model(x: float):
return x * 42


ml_models = {}


asynccontextmanager
async def lifespan(app: FastAPI):
Load the ML model
ml_models["answer_to_everything"] = fake_answer_to_everything_ml_model
yield
Clean up the ML models and release the resources
ml_models.clear()


app = FastAPI(lifespan=lifespan)


app.get("/predict")
async def predict(x: float):
result = ml_models["answer_to_everything"](x)
return {"result": result}


**Note**: This is the recommended way going forward, instead of using `startup` and `shutdown` events.

Read more about it in the new docs: [Advanced User Guide: Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).

Docs

* ✏ Fix formatting in `docs/en/docs/tutorial/metadata.md` for `ReDoc`. PR [6005](https://github.com/tiangolo/fastapi/pull/6005) by [eykamp](https://github.com/eykamp).

Translations

* 🌐 Tamil translations - initial setup. PR [5564](https://github.com/tiangolo/fastapi/pull/5564) by [gusty1g](https://github.com/gusty1g).
* 🌐 Add French translation for `docs/fr/docs/advanced/path-operation-advanced-configuration.md`. PR [9221](https://github.com/tiangolo/fastapi/pull/9221) by [axel584](https://github.com/axel584).
* 🌐 Add French translation for `docs/tutorial/debugging.md`. PR [9175](https://github.com/tiangolo/fastapi/pull/9175) by [frabc](https://github.com/frabc).
* 🌐 Initiate Armenian translation setup. PR [5844](https://github.com/tiangolo/fastapi/pull/5844) by [har8](https://github.com/har8).
* 🌐 Add French translation for `deployment/manually.md`. PR [3693](https://github.com/tiangolo/fastapi/pull/3693) by [rjNemo](https://github.com/rjNemo).

Internal

* 👷 Update translation bot messages. PR [9206](https://github.com/tiangolo/fastapi/pull/9206) by [tiangolo](https://github.com/tiangolo).
* 👷 Update translations bot to use Discussions, and notify when a PR is done. PR [9183](https://github.com/tiangolo/fastapi/pull/9183) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors-badges. PR [9182](https://github.com/tiangolo/fastapi/pull/9182) by [tiangolo](https://github.com/tiangolo).
* 👥 Update FastAPI People. PR [9181](https://github.com/tiangolo/fastapi/pull/9181) by [github-actions[bot]](https://github.com/apps/github-actions).
* 🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error. PR [9171](https://github.com/tiangolo/fastapi/pull/9171) by [tiangolo](https://github.com/tiangolo).
* 💚 Fix/workaround GitHub Actions in Docker with git for FastAPI People. PR [9169](https://github.com/tiangolo/fastapi/pull/9169) by [tiangolo](https://github.com/tiangolo).
* ♻️ Refactor FastAPI Experts to use only discussions now that questions are migrated. PR [9165](https://github.com/tiangolo/fastapi/pull/9165) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade analytics. PR [6025](https://github.com/tiangolo/fastapi/pull/6025) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade and re-enable installing Typer-CLI. PR [6008](https://github.com/tiangolo/fastapi/pull/6008) by [tiangolo](https://github.com/tiangolo).

0.92.0

Not secure
🚨 This is a security fix. Please upgrade as soon as possible.

Upgrades

* ⬆️ Upgrade Starlette to 0.25.0. PR [5996](https://github.com/tiangolo/fastapi/pull/5996) by [tiangolo](https://github.com/tiangolo).
* This solves a vulnerability that could allow denial of service attacks by using many small multipart fields/files (parts), consuming high CPU and memory.
* Only applications using forms (e.g. file uploads) could be affected.
* For most cases, upgrading won't have any breaking changes.

0.91.0

Not secure
Upgrades

* ⬆️ Upgrade Starlette version to `0.24.0` and refactor internals for compatibility. PR [5985](https://github.com/tiangolo/fastapi/pull/5985) by [tiangolo](https://github.com/tiangolo).
* This can solve nuanced errors when using middlewares. Before Starlette `0.24.0`, a new instance of each middleware class would be created when a new middleware was added. That normally was not a problem, unless the middleware class expected to be created only once, with only one instance, that happened in some cases. This upgrade would solve those cases (thanks [adriangb](https://github.com/adriangb)! Starlette PR [#2017](https://github.com/encode/starlette/pull/2017)). Now the middleware class instances are created once, right before the first request (the first time the app is called).
* If you depended on that previous behavior, you might need to update your code. As always, make sure your tests pass before merging the upgrade.

0.90.1

Not secure
Upgrades

* ⬆️ Upgrade Starlette range to allow 0.23.1. PR [5980](https://github.com/tiangolo/fastapi/pull/5980) by [tiangolo](https://github.com/tiangolo).

Docs

* ✏ Tweak wording to clarify `docs/en/docs/project-generation.md`. PR [5930](https://github.com/tiangolo/fastapi/pull/5930) by [chandra-deb](https://github.com/chandra-deb).
* ✏ Update Pydantic GitHub URLs. PR [5952](https://github.com/tiangolo/fastapi/pull/5952) by [yezz123](https://github.com/yezz123).
* 📝 Add opinion from Cisco. PR [5981](https://github.com/tiangolo/fastapi/pull/5981) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/tutorial/cookie-params.md`. PR [5890](https://github.com/tiangolo/fastapi/pull/5890) by [bnzone](https://github.com/bnzone).

Internal

* ✏ Update `zip-docs.sh` internal script, remove extra space. PR [5931](https://github.com/tiangolo/fastapi/pull/5931) by [JuanPerdomo00](https://github.com/JuanPerdomo00).

0.90.0

Not secure
Upgrades

* ⬆️ Bump Starlette from 0.22.0 to 0.23.0. Initial PR [5739](https://github.com/tiangolo/fastapi/pull/5739) by [Kludex](https://github.com/Kludex).

Docs

* 📝 Add article "Tortoise ORM / FastAPI 整合快速筆記" to External Links. PR [5496](https://github.com/tiangolo/fastapi/pull/5496) by [Leon0824](https://github.com/Leon0824).
* 👥 Update FastAPI People. PR [5954](https://github.com/tiangolo/fastapi/pull/5954) by [github-actions[bot]](https://github.com/apps/github-actions).
* 📝 Micro-tweak help docs. PR [5960](https://github.com/tiangolo/fastapi/pull/5960) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update new issue chooser to direct to GitHub Discussions. PR [5948](https://github.com/tiangolo/fastapi/pull/5948) by [tiangolo](https://github.com/tiangolo).
* 📝 Recommend GitHub Discussions for questions. PR [5944](https://github.com/tiangolo/fastapi/pull/5944) by [tiangolo](https://github.com/tiangolo).

Translations

* 🌐 Add Russian translation for `docs/ru/docs/tutorial/body-fields.md`. PR [5898](https://github.com/tiangolo/fastapi/pull/5898) by [simatheone](https://github.com/simatheone).
* 🌐 Add Russian translation for `docs/ru/docs/help-fastapi.md`. PR [5970](https://github.com/tiangolo/fastapi/pull/5970) by [tiangolo](https://github.com/tiangolo).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/static-files.md`. PR [5858](https://github.com/tiangolo/fastapi/pull/5858) by [batlopes](https://github.com/batlopes).
* 🌐 Add Portuguese translation for `docs/pt/docs/tutorial/encoder.md`. PR [5525](https://github.com/tiangolo/fastapi/pull/5525) by [felipebpl](https://github.com/felipebpl).
* 🌐 Add Russian translation for `docs/ru/docs/contributing.md`. PR [5870](https://github.com/tiangolo/fastapi/pull/5870) by [Xewus](https://github.com/Xewus).

Internal

* ⬆️ Upgrade Ubuntu version for docs workflow. PR [5971](https://github.com/tiangolo/fastapi/pull/5971) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update sponsors badges. PR [5943](https://github.com/tiangolo/fastapi/pull/5943) by [tiangolo](https://github.com/tiangolo).
* ✨ Compute FastAPI Experts including GitHub Discussions. PR [5941](https://github.com/tiangolo/fastapi/pull/5941) by [tiangolo](https://github.com/tiangolo).
* ⬆️ Upgrade isort and update pre-commit. PR [5940](https://github.com/tiangolo/fastapi/pull/5940) by [tiangolo](https://github.com/tiangolo).
* 🔧 Add template for questions in Discussions. PR [5920](https://github.com/tiangolo/fastapi/pull/5920) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update Sponsor Budget Insight to Powens. PR [5916](https://github.com/tiangolo/fastapi/pull/5916) by [tiangolo](https://github.com/tiangolo).
* 🔧 Update GitHub Sponsors badge data. PR [5915](https://github.com/tiangolo/fastapi/pull/5915) by [tiangolo](https://github.com/tiangolo).

Page 7 of 31

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.