(Learn how and when to remove this message)

FastAPI is a modern web framework first released in 2018 for building RESTful APIs in Python.[3] It is used for building APIs with Python 3.8+ based on standard Python-type hints.

FastAPI
Developer(s)Sebastián Ramírez
Initial releaseDecember 5, 2018; 5 years ago (2018-12-05)[1]
Stable release
0.111.0[2] Edit this on Wikidata / 3 May 2024; 20 days ago (3 May 2024)
Repositorygithub.com/tiangolo/fastapi
Written inPython
TypeWeb framework
LicenseMIT
Websitefastapi.tiangolo.com

FastAPI is based on Pydantic and uses type hints to validate, serialize and deserialize data. It also automatically generates OpenAPI documentation for APIs built with it.[4]

Components

Pydantic

Pydantic is a data validation library for Python. While writing code in an IDE, Pydantic provides type hints for schema validation and serialization through type annotations.[5]

Starlette

Starlette is a lightweight ASGI framework/toolkit, to support async functionality in Python.[6]

Uvicorn

Uvicorn is a minimal low-level server/application web server for async frameworks, following the ASGI specification.

Example

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

from fastapi import FastAPIapp = FastAPI()@app.get("/")def read_root():    return "Hello World!"

See also

External links

References

Retrieved from "https:https://www.search.com.vn/wiki/index.php?lang=en&q=FastAPI&oldid=1222875868"
🔥 Top keywords: Main PageSpecial:SearchWikipedia:Featured picturesYasukeHarrison ButkerRobert FicoBridgertonCleopatraDeaths in 2024Joyce VincentXXXTentacionHank AdamsIt Ends with UsYouTubeNew Caledonia2024 Indian general electionHeeramandiDarren DutchyshenSlovakiaKingdom of the Planet of the ApesAttempted assassination of Robert FicoLawrence WongBaby ReindeerXXX: Return of Xander CageThelma HoustonFuriosa: A Mad Max SagaMegalopolis (film)Richard GaddKepler's SupernovaWicked (musical)Sunil ChhetriXXX (2002 film)Ashley MadisonAnya Taylor-JoyPlanet of the ApesNava MauYoung SheldonPortal:Current eventsX-Men '97