Extensions#
Administration#
- SQLAlchemy Admin for Starlette/FastAPI
Flexible admin interface for SQLAlchemy models.
- Piccolo Admin
Simple but powerful admin interface over Piccolo tables that lets you easily add, edit and filter your data
Authentication#
- AuthX
Ready-to-use and customisable authentication and Oauth2 management
- FastAPI Security
Authentication and authorisation
- FastAPI simple security
API key-based security package focused on ease of use
- FastAPI Users
Quickly adds a customisable registration and authentication system
ORMs#
- FastAPI-SQLAlchemy
Easy integration between FastAPI, SQLAlchemy and application
- FastAPIwee
Easy way to create a REST API based on PeeWee models
- GINO
Lightweight asynchronous ORM built on SQLAlchemy Core for Python asyncio, supporting PostgreSQL with asyncpg, and MySQL with aiomysql (→ example)
- ORM
async ORM, which builds on SQLAlchemy Core, Databases and TypeSystem
- ormar
Asynchronous mini-ORM, with which you only need to maintain one set of models and migrate them with Alembic if necessary (→ example); it is also supported by fastapi-users, fastapi-crudrouter and fastapi-pagination
- Piccolo
Fast, user-friendly ORM and query builder that supports Asyncio (→ examples)
- Prisma Client Python
Building on the TypeScript ORM Prisma with support for PostgreSQL, MySQL, SQLite, MongoDB and SQL Server (→ Example)
- Tortoise ORM
Easy-to-use asyncio ORM inspired by Django (→ examples); Aerich is a database migration tool for Tortoise ORM.
- SQLModel
Library for the interaction of SQL databases with Python objects
SQL Query Builders#
- FastAPI Filter
Querystring filters for the Api endpoints and the Swagger user interface. The supported backends are SQLAlchemy and MongoEngine.
- asyncpgsa
Python wrapper around asyncpg for use with SQLAlchemy
- Databases
Simple asyncio support for the database drivers asyncpg, aiopg, aiomysql, asyncmy and aiosqlite
ODMs#
- MongoEngine
Python Object-Document Mapper for working with MongoDB
- ODMantic
Asynchronous ODM (Object Document Mapper) for MongoDB based on Python type hints and pydantic
Code generators#
- fastapi-code-generator
Code generator creates a FastAPI application from an openapi file, using datamodel-code-generator to generate the pydantic model
- FastAPI-based API Client Generator
mypy- and IDE-friendly API client from an OpenAPI specification using the OpenAPI Generator
Utilities#
Caching#
- FastAPI Cache
Lightweight cache system
- fastapi-cache
Caching of fastapi responses and function results, with backends supporting redis, memcache and dynamodb
E-mail#
- Fastapi-mail
Easy mail system for sending e-mails and attachments, individually or in large quantities
GraphQL#
- Strawberry GraphQL
Python GraphQL library based on data classes
Logging#
- ASGI Correlation ID middleware
Middleware to load or generate correlation IDs for each incoming request
- starlette context
Middleware for Starlette that allows you to store and access the contextual data of a request
Prometheus#
- Prometheus FastAPI Instrumentator
Configurable and modular Prometheus instrumentator
- starlette_exporter
Prometheus export programme for Starlette and FastAPI
- Starlette Prometheus
Prometheus integration for Starlette
Templating#
- fastapi-jinja
Integration of the Jinja template language
- fastapi-chameleon
Integration of the template language Chameleon
Pagination#
- FastAPI Pagination
Easy-to-use pagination for FastAPI with integration in sqlalchemy, gino, databases and ormar, among others
Websockets#
- fastapi-socketio
Easy integration of socket.io in into your FastAPI application
- FastAPI Websocket Pub/Sub
Fast and permanent pub/sub channel via websockets
- FASTAPI Websocket RPC
Fast and permanent bidirectional JSON RPC channel via websockets
Other tools#
- Pydantic-SQLAlchemy
Creating Pydantic models from SQLAlchemy models
- Fastapi Camelcase
Provision of a class of request and response bodies for FastAPI
- fastapi_profiler
FastAPI middleware based on pyinstrument for performance testing
- fastapi-versioning
API versioning for FastAPI web applications
- Jupter Notebook REST API
Run Jupyter notebooks as REST API endpoint
- manage-fastapi
Project generator and manager for FastAPI
- msgpack-asgi
Automatic negotiation of MessagePack content in ASGI applications
- fastapi-plugins
Production-ready plug-ins for the FastAPI framework, including for caching with memcached or Redis, scheduler, configuration and logging
- fastapi-serviceutils
Optimised logging, exception handling and configuration