Fastapi

Latest version: v0.111.0

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

Scan your dependencies

Page 21 of 31

0.41.0

Not secure
* 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

Not secure
* 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

Not secure
* 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

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

0.38.0

Not secure
* 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

Not secure
* 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).

Page 21 of 31

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.