![]() |
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
|
Developer(s) | Sebastián Ramírez |
---|---|
Initial release | December 5, 2018; 5 years ago (2018-12-05)[1] |
Stable release |
0.111.0[2] |
Repository | github |
Written in | Python |
Type | Web framework |
License | MIT |
Website | fastapi |
FastAPI is a modern web framework first released in 2018 for building RESTful APIsinPython.[3] It is used for building APIs with Python 3.8+ based on standard Python-type hints.
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]
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 is a lightweight ASGI framework/toolkit, to support async functionality in Python.[6]
Uvicorn is a minimal low-level server/application web server for async frameworks, following the ASGI specification. Technically, it implements a multi-process model with one main process, which is responsible for managing a pool of worker processes and distributing incoming HTTP requests to them. The number of worker processes is pre-configured, but can also be adjusted up or down at runtime.[7]
The following code shows a simple web application that displays "Hello World!" when visited:
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return "Hello World!"
| |
---|---|
| |
.NET |
|
C++ |
|
ColdFusion |
|
Common Lisp |
|
Haskell |
|
Java |
|
JavaScript |
|
Perl |
|
PHP |
|
Python |
|
Ruby |
|
Rust |
|
Scala |
|
Smalltalk |
|
Other languages |
|
![]() | This Web-software-related article is a stub. You can help Wikipedia by expanding it. |