Jump to content

FastAPI

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nicksondc (talk | contribs) at 08:43, 12 April 2023 (I made changes to the original text to make it more appropriate for a Wikipedia page on FastAPI. I added some introductory information about what FastAPI is and why it has become popular among developers. I also clarified some technical details about how FastAPI uses Pydantic and type hints, as well as how it automatically generates OpenAPI documentation. I also made some minor changes to the wording to make it more appropriate for a Wikipedia article.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
FastAPI
Developer(s)Sebastián Ramírez
Initial releaseDecember 5, 2018; 6 years ago (2018-12-05)[1]
Stable release
0.116.1[2] Edit this on Wikidata / 11 July 2025; 14 days ago (11 July 2025)
Repositorygithub.com/tiangolo/fastapi
Written inPython
TypeWeb framework
LicenseMIT
Websitefastapi.tiangolo.com

FastAPI is a modern Web framework for building RESTful APIs in Python. It was first released in 2018 and has quickly gained popularity among developers due to its ease of use, speed and robustness. FastAPI is based on Pydantic and type hints to validate, serialize, and deserialize data. It also automatically generates OpenAPI documentation for APIs built with it.[3]

FastAPI fully supports asynchronous programming and can run on Gunicorn and ASGI servers such as Uvicorn and Hypercorn,[4] making it a good choice for production environments. To improve developer-friendliness, editor support was considered since the project's earliest days.[5]

Adoption and real-world usage

FastAPI was the third most loved web framework in Stack Overflow 2021 Developer Survey.[6]

T. Danka stressed its value for data science applications.[7]

Large companies like Uber and Netflix use it to develop some of their applications.[8][9]

Example

The following code shows a simple web application that displays "Hello World!" when visited:[10]

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return "Hello World!"

See also

References

  1. ^ "fastapi repo". GitHub. 2018-12-05.
  2. ^ "Release 0.116.1". 11 July 2025. Retrieved 18 July 2025.
  3. ^ Lubanovic, Bill (2019-11-06). Introducing Python: Modern Computing in Simple Packages (2nd ed.). O'Reilly Media, Inc. pp. 397, 418. ISBN 9781492051367.
  4. ^ Philipp Kats; David Katz (2019-08-30). Learn Python by Building Data Science Applications. Packt Publishing Ltd. pp. 435, 365. ISBN 9781789535365.
  5. ^ "History, Design and Future - FastAPI". Retrieved 4 November 2020.
  6. ^ "Stack Overflow Developer Survey 2021". Stack Overflow. Retrieved 2021-08-25.
  7. ^ Danka, Tivadar (2021-08-17). "You Should Start Using FastAPI Now". Towards Data Science. Retrieved 2021-08-25.
  8. ^ "Ludwig v0.2 Adds New Features and Other Improvements to its Deep Learning Toolbox". Uber Engineering. 2019-07-24. Retrieved 4 November 2020.
  9. ^ "Introducing Dispatch". Netflix Technology Blog. 2020-02-25. Retrieved 4 November 2020.
  10. ^ "Example". Retrieved 2022-09-14.