Skip to content
EntityQ101119404· pop 10· linked from 155 articles

FastAPI is a web framework for building HTTP-based service APIs in Python 3.8+. It uses Pydantic and type hints to validate, serialize and deserialize data. FastAPI also automatically generates OpenAPI documentation for APIs built with it. It was first released in 2018.

Key facts

Software.name
FastAPI
Software.logo
FastAPI logo.svg
Software.logo size
200px
Software.developer
Sebastián Ramírez
Software.programming language
Python
Software.genre
Web framework
Software.license
MIT

via Wikipedia infobox

Source code

FastAPI is a modern, fast (high-performance), web framework for building APIs with Python based on standard Python type hints. estimation based on tests conducted by an internal development team, building production applications. If you don't know, check the "In a hurry?" section about async and await in the docs. The command fastapi dev reads your main.py file automatically, detects the FastAPI app in it, and starts a server using Uvicorn. By default, fastapi dev will start with auto-reload enabled for local development. Now modify the file main.py to receive a body from a PUT request. In summary, you declare once the types of parameters, body, etc. as function parameters. We just scratched the surface, but you already get the idea of how it all works. ...and see how your editor will auto-complete the attributes and know their types: For a more complete example including more features, see the Tutorial - User Guide . You can optionally deploy your FastAPI app to FastAPI Cloud with a single command. 🚀 FastAPI Cloud is built by the same author and team behind FastAPI . FastAPI Cloud is the primary sponsor and funding provider for the FastAPI and friends open source projects. ✨ FastAPI is open source and based on standards. You can deploy FastAPI apps to any cloud provider you choose. Follow your cloud provider's guides to deploy FastAPI apps with them. 🤓 Independent TechEmpower benchmarks show FastAPI applications running under Uvicorn as one of the fastest Python frameworks available, only below Starlette and Uvicorn themselves (used internally by FastAPI). ( ) uvicorn - for the server that loads and serves your application. This includes uvicorn[standard] , which includes some dependencies (e.g. uvloop ) needed for high performance serving. fastapi-cli[standard] - to provide the fastapi command. This includes fastapi-cloud-cli , which allows you to deploy your FastAPI application to FastAPI Cloud. If you don't want to include the standard optional dependencies, you can install with pip install fastapi instead of pip install "fastapi[standard]" . If you want to install FastAPI with the standard dependencies but without the fastapi-cloud-cli , you can install with pip install "fastapi[standard-no-fastapi-cloud-cli]" .

Excerpt from the source-code README · 22,777 chars · not written by Vinony

Wikidata facts

Official website
fastapi.tiangolo.com
Show 4 more facts
source code repository URL
github.com/fastapi/fastapi
software version identifier
0.136.1
Commons category
FastAPI
Sources (3)

via Wikidata · CC0

~6 min read

Article

14 sections
Contents
  • Components
  • Pydantic
  • Starlette
  • Uvicorn
  • OpenAPI integration
  • Features
  • Asynchronous operations
  • Dependency injection
  • WebSockets support
  • Background tasks
  • Example
  • See also
  • External links
  • References

FastAPI is a web framework for building HTTP-based service APIs in Python 3.8+. It uses Pydantic and type hints to validate, serialize and deserialize data. FastAPI also automatically generates OpenAPI documentation for APIs built with it. It was first released in 2018.

== Components ==

Available in 8 languages

via Wikidata sitelinks · CC0

Connections

Categories