Skip to content

A curated list of awesome things related to FastAPI

License

Notifications You must be signed in to change notification settings

mjhea0/awesome-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

305 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome FastAPI | Awesome

A curated list of awesome things related to FastAPI.

FastAPI is a modern, high-performance, batteries-included Python web framework that's perfect for building RESTful APIs.

Contents

Third-Party Extensions

Admin

  • FastAPI Admin - Functional admin panel that provides a user interface for performing CRUD operations on your data. Currently only works with the Tortoise ORM.
  • FastAPI Amis Admin - A high-performance, efficient and easily extensible FastAPI admin framework.
  • Piccolo Admin - A powerful and modern admin GUI, using the Piccolo ORM.
  • SQLAlchemy Admin - Admin Panel for FastAPI/Starlette that works with SQLAlchemy models.
  • Starlette Admin - Admin framework for FastAPI/Starlette, supporting SQLAlchemy, SQLModel, MongoDB, and ODMantic.

Auth

CyberSecurity

  • FastAPI Guard - Rate Limiting, Automatically Ban IPs, Penetration Attack Detection, Whitelist/blacklist (countries, IPs, Cloud Providers), User Agent Filtering, Geolocation, Redis integration for persistence, and more.

Databases

ORMs

  • Edgy ORM - Complex databases made simple.
  • FastAPI SQLAlchemy - Simple integration between FastAPI and SQLAlchemy.
  • Fastapi-SQLA - SQLAlchemy extension for FastAPI with support for pagination, asyncio, and pytest.
  • FastAPIwee - A simple way to create REST API based on PeeWee models.
  • FastSQLA - Async SQLAlchemy 2.0+ extension for FastAPI with SQLModel support, built-in pagination & more.
  • GINO - A lightweight asynchronous ORM built on top of SQLAlchemy core for Python asyncio.
  • ORM - An async ORM.
  • ormar - Ormar is an async ORM that uses Pydantic validation and can be used directly in FastAPI requests and responses so you are left with only one set of models to maintain. Alembic migrations included.
  • Piccolo - An async ORM and query builder, supporting Postgres and SQLite, with batteries (migrations, security, etc).
  • Tortoise ORM - An easy-to-use asyncio ORM (Object Relational Mapper) inspired by Django.
  • Saffier ORM - The only Python ORM you will ever need.
  • SQLModel - SQLModel (which is powered by Pydantic and SQLAlchemy) is a library for interacting with SQL databases from Python code, with Python objects.

Query Builders

ODMs

  • Beanie - Asynchronous Python ODM for MongoDB, based on Motor and Pydantic, which supports data and schema migrations out of the box.
  • MongoEngine - A Document-Object Mapper (think ORM, but for document databases) for working with MongoDB from Python.
  • Motor - Asynchronous Python driver for MongoDB.
  • ODMantic - AsyncIO MongoDB ODM integrated with Pydantic.
  • PynamoDB - A pythonic interface to Amazon's DynamoDB.

Other Tools

Dependency Injection

  • Wireup - Inject dependencies with zero runtime overhead in FastAPI; Share dependencies across web, cli or other interfaces.

Developer Tools

  • FastAPI Code Generator - Create a FastAPI app from an OpenAPI file, enabling schema-driven development.
  • FastAPI Client Generator - Generate a mypy- and IDE-friendly API client from an OpenAPI spec.
  • FastAPI Cruddy Framework - A companion library to FastAPI designed to bring the development productivity of Ruby on Rails, Ember.js or Sails.js to the FastAPI ecosystem.
  • FastAPI MVC - Developer productivity tool for making high-quality FastAPI production-ready APIs.
  • FastAPI Profiler - A FastAPI Middleware of joerick/pyinstrument to check your service performance.
  • FastAPI Versioning - API versioning.
  • Jupyter Notebook REST API - Run your Jupyter notebooks as RESTful API endpoints.
  • Manage FastAPI - CLI tool for generating and managing FastAPI projects.
  • msgpack-asgi - Automatic MessagePack content negotiation.
  • python-cqrs - Event-Driven Architecture Framework with CQRS, Transaction Outbox, Saga orchestration, seamless FastAPI/FastStream integration.

Email

  • FastAPI Mail - Lightweight mail system for sending emails and attachments (individual and bulk).

Utils

  • Apitally - API analytics, monitoring, and request logging for FastAPI.
  • ASGI Correlation ID - Request ID logging middleware.
  • FastAPI Cache - A simple lightweight cache system.
  • FastAPI Cache - A tool to cache FastAPI response and function results, with support for Redis, Memcached, DynamoDB, and in-memory backends.
  • FastAPI Chameleon - Adds integration of the Chameleon template language to FastAPI.
  • FastAPI CloudEvents - CloudEvents integration for FastAPI.
  • FastAPI Contrib - Opinionated set of utilities: pagination, auth middleware, permissions, custom exception handlers, MongoDB support, and Opentracing middleware.
  • FastAPI FastCRUD) - Robust async CRUD operations and flexible endpoint creation utilities.
  • FastAPI Events - Asynchronous event dispatching/handling library for FastAPI and Starlette.
  • FastAPI FeatureFlags - Simple implementation of feature flags for FastAPI.
  • FastAPI Injectable - Use FastAPI's dependency injection outside route handlers in CLI tools, background tasks, workers, and more.
  • FastAPI Jinja - Adds integration of the Jinja template language to FastAPI.
  • FastAPI Lazy - Lazy package to start your project using FastAPI.
  • FastAPI Limiter - A request rate limiter for FastAPI.
  • FastAPI Listing - A library to design/build listing APIs using component-based architecture, inbuilt query paginator, sorter, django-admin like filters & much more.
  • FastAPI MQTT - An extension for the MQTT protocol.
  • FastAPI Opentracing - Opentracing middleware and database tracing support for FastAPI.
  • FastAPI Pagination - Pagination for FastAPI.
  • FastAPI Plugins - Redis and Scheduler plugins.
  • FastAPI ServiceUtils - Generator for creating API services.
  • FastAPI Shield - General FastAPI library for writing any generic endpoint decorators capable of lazy dependencies injection.
  • FastAPI SocketIO - Easy integration for FastAPI and SocketIO.
  • FastAPI Utilities - Reusable utilities: class-based views, response inferring router, periodic tasks, timing middleware, SQLAlchemy session, OpenAPI spec simplification.
  • FastAPI Websocket Pub/Sub - The classic pub/sub pattern made easily accessible and scalable over the web and across your cloud in realtime.
  • FastAPI Websocket RPC - RPC (bidirectional JSON RPC) over Websockets made easy, robust, and production ready.
  • OpenTelemetry FastAPI Instrumentation - Library provides automatic and manual instrumentation of FastAPI web frameworks, instrumenting http requests served by applications utilizing the framework.
  • Prerender Python Starlette - Starlette middleware for Prerender.
  • Prometheus FastAPI Instrumentator - A configurable and modular Prometheus Instrumentator for your FastAPI application.
  • SlowApi - Rate limiter (based on Flask-Limiter).
  • Starlette Context - Allows you to store and access the request data anywhere in your project, useful for logging.
  • Starlette Exporter - One more prometheus integration for FastAPI and Starlette.
  • Starlette OpenTracing - Opentracing support for Starlette and FastAPI.
  • Starlette Prometheus - Prometheus integration for FastAPI and Starlette.
  • Strawberry GraphQL - Python GraphQL library based on dataclasses.
  • Pydantic Resolve - Turns pydantic class into a powerful composable computing container by introducing resolve and post-process hooks.

Resources

Official Resources

  • Documentation - Comprehensive documentation.
  • Tutorial - Official tutorial showing you how to use FastAPI with most of its features, step by step.
  • Source Code - Hosted on GitHub.
  • Discord - Chat with other FastAPI users.

External Resources

  • TestDriven.io FastAPI - Multiple FastAPI-specific articles that focus on developing and testing production-ready RESTful APIs, serving up machine learning models, and more.

Podcasts

Articles

Tutorials

Talks

Videos

Courses

Best Practices

Hosting

PaaS

(Platforms-as-a-Service)

IaaS

(Infrastructure-as-a-Service)

Serverless

Frameworks:

Compute:

Projects

Boilerplate

Docker Images

  • inboard - Docker images to power your FastAPI apps and help you ship faster.
  • uvicorn-gunicorn-fastapi-docker - Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.7 and 3.6 with performance auto-tuning.
  • uvicorn-gunicorn-poetry - Docker image with Gunicorn using Uvicorn workers for running Python web applications. Uses Poetry for managing dependencies and setting up a virtual environment. Supports AMD64 and ARM64 CPU architectures.
  • uvicorn-poetry - Docker image with Uvicorn ASGI server for running Python web applications on Kubernetes. Uses Poetry for managing dependencies and setting up a virtual environment. Supports AMD64 and ARM64 CPU architectures.

Open Source Projects

  • Astrobase - Simple, fast, and secure deployments anywhere.
  • Awesome FastAPI Projects - Organized list of projects that use FastAPI.
  • Bitcart - Platform for merchants, users and developers which offers easy setup and use.
  • Bali - Simplify Cloud Native Microservices development base on FastAPI and gRPC.
  • Bunnybook - A tiny social network built with FastAPI, React+RxJs, Neo4j, PostgreSQL, and Redis.
  • Coronavirus-tg-api - API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak.
  • Dispatch - Manage security incidents.
  • FastAPI CRUD Example:
  • FastAPI with Observability - Observe FastAPI app with three pillars of observability: Traces (Tempo), Metrics (Prometheus), Logs (Loki) on Grafana through OpenTelemetry and OpenMetrics.
  • DogeAPI - API with high performance to create a simple blog and CRUD with OAuth2PasswordBearer.
  • FastAPI Websocket Broadcast - Websocket 'broadcast' demo.
  • FastAPI with Celery, RabbitMQ, and Redis - Minimal example utilizing FastAPI and Celery with RabbitMQ for task queue, Redis for Celery backend, and Flower for monitoring the Celery tasks.
  • FuturamaAPI - A REST and GraphQL playground built with best practices, providing WebSockets, SSE, callbacks, secret messages, and more.
  • JeffQL - Simple authentication and login API using GraphQL and JWT.
  • JSON-RPC Server - JSON-RPC server based on FastAPI.
  • Mailer - Dead-simple mailer micro-service for static websites.
  • Markdown-Videos - API for generating thumbnails to embed into your markdown content.
  • Nemo - Be productive with Nemo.
  • OPAL (Open Policy Administration Layer) - Real-time authorization updates on top of Open-Policy; built with FastAPI, Typer, and FastAPI WebSocket pub/sub.
  • OSBot-Fast-API - Type-safe FastAPI wrapper that provides middleware, HTTP event tracking, AWS Lambda integration, test utilities, and auto-conversion between Type_Safe, Pydantic, and dataclasses.
  • Polar - A funding and monetization platform for developers, built with FastAPI, SQLAlchemy, Alembic, and Arq.
  • RealWorld Example App - mongo
  • RealWorld Example App - postgres
  • redis-streams-fastapi-chat - A simple Redis Streams backed chat app using Websockets, Asyncio and FastAPI/Starlette.
  • Sprites as a service - Generate your personal 8-bit avatars using Cellular Automata.
  • Slackers - Slack webhooks API.
  • TermPair - View and control terminals from your browser with end-to-end encryption.
  • Universities - API service for obtaining information about +9600 universities worldwide.

Sponsors

Please support this open source project by checking out our sponsors:

About

A curated list of awesome things related to FastAPI

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published