FastAPI#
FastAPI is a high-performance web framework for building APIs with Python 3.7+ based on standard Python type hints. It combines the simplicity of Flask with the performance of Node.js and Go, making it one of the fastest Python frameworks available.
π New to App-Generator? Sign IN with GitHub or Generate Web Apps in no time (free service).
Key Features#
Fast: Extremely high performance, on par with NodeJS and Go
Intuitive: Great editor support with autocompletion
Easy: Designed to be easy to use and learn
Validated: Automatic request validation using Python type hints
Standards-based: Based on OpenAPI and JSON Schema standards
Automatic docs: Interactive API documentation generated automatically
Quick Start#
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str = None):
return {"item_id": item_id, "q": q}
Run with Uvicorn:
pip install fastapi uvicorn
uvicorn main:app --reload
Visit http://127.0.0.1:8000/docs for interactive API documentation.
FastAPIβs combination of speed, simplicity, and automatic validation makes it an excellent choice for modern API development, especially for developers who value type safety and documentation.
Links#
π New to App-Generator? Join our 10k+ Community using GitHub One-Click SignIN.
π
Download
products and start fast a new projectπ Bootstrap your startUp, MVP or Legacy project with a custom development sprint
Resources#
- Getting Started
- Cheatsheet
- Migrate Django API
- Databases Integration
- Autogenerated API Docs
- Caching Strategies
- GraphQL APIs
- Update and Delete
- Integrating ML Models
- Performance Tunning
- WebHooks
- WebSockets
- Serverless
- Role-Based Access
- Multitenancy
- Multi-factor Authentication (MFA) in FastAPI
- Real-time Notifications
- i18n and Localization
- Security Best Practices
- Testing FastAPI
- Starters
- Docker
- Releases
- Production Checklist
- Deployment