Category articles "Fastapi"
Study all materials on this topic
HTML sites with FastAPI: Jinja, static files, and forms
FastAPI can return more than JSON. Jinja2Templates renders HTML, while StaticFiles serves CSS and images. A regular HTML form uses...
Middleware and CORS in FastAPI
Middleware processes requests and responses around FastAPI routes, while CORS controls which browser origins may access the API.
HTTPException in FastAPI
Covered topics: Basic Usage, Status Codes, Error Details, Custom Headers.
Dependency Injection in FastAPI
Depends — FastAPI's dependency injection system for reusing code across endpoints.
Testing FastAPI with pytest
Covered topics: Installation, TestClient (synchronous), Test database, Tests with fixtures.
Lifespan Events in FastAPI
Lifespan — manage application startup and shutdown (DB initialization, ML models, connection pools).
Background Tasks in FastAPI
BackgroundTasks — execute tasks after the response has been sent to the client.
FastAPI: Basics
FastAPI is a modern Python framework for building APIs. Automatic documentation, type hints, high performance.
Alembic: Database Migrations
Alembic is a migration management tool for SQLAlchemy/SQLModel.
SQLModel CRUD in FastAPI
SQLModel combines SQLAlchemy and Pydantic — a single model for both the database and the API.
OAuth2 Bearer in FastAPI
OAuth2PasswordBearer is FastAPI's Bearer token authentication scheme.
Swagger and OpenAPI in FastAPI
FastAPI builds documentation from routes, types, and Pydantic models. /docs is therefore a visual representation of your API contract, not...
Other categories
Study related topics
Want more materials?
Subscribe to updates and be the first to know about new articles!