fastapi

Package — Web FrameworkPython 3.8+Intermediate

Modern async API framework with automatic OpenAPI docs and Pydantic validation

Quick Info

Documentation
Official Docs
Python Version
3.8+
Dependencies
Starlette, Pydantic, anyio, typing-extensions
Install
pip install fastapi[standard]

Learn by Difficulty

Quick Example

python
# Install: pip install fastapi[standard]
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hello, World!"}

@app.get("/items/{item_id}")
async def read_item(item_id: int, q: str = None):
    return {"item_id": item_id, "q": q}

fastapi is a third-party package. Modern async API framework with automatic OpenAPI docs and Pydantic validation. Install with: pip install fastapi[standard]

Try in Playground

Tags

packagewebframeworkasyncapiopenapi

Related Items