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.
- FastAPI Admin - Functional admin panel that provides a user interface for performing CRUD operations on your data.
- FastAPI Auth - Pluggable auth that supports the OAuth2 Password Flow with JWT access and refresh tokens.
- FastAPI Cloud Auth - Simple integration between FastAPI and cloud authentication services (AWS Cognito, Auth0, Firebase Authentication).
- FastAPI Login - Account management and authentication (based on Flask-Login).
- FastAPI JWT Auth - JWT auth (based on Flask-JWT-Extended).
- FastAPI Permissions - Row-level permissions.
- FastAPI Security - Implements authentication and authorization as dependencies in FastAPI.
- FastAPI Simple Security - Out-of-the-box API key security manageable through path operations.
- FastAPI Users - Account management, authentication, authorization.
- FastAPI SQLAlchemy - Simple integration between FastAPI and SQLAlchemy.
- Tortoise ORM - An easy-to-use asyncio ORM (Object Relational Mapper) inspired by Django.
- FastAPI Example - An example of the Tortoise-ORM FastAPI integration.
- Tutorial: Setting up Tortoise ORM with FastAPI
- Aerich - Tortoise ORM migrations tools.
- GINO - A lightweight asynchronous ORM built on top of SQLAlchemy core for Python asyncio.
- ORM - An async ORM.
- ormar - An async mini ORM for Python.
- Piccolo - An async ORM and query builder, supporting Postgres and SQLite, with batteries (migrations, security, etc).
- FastAPI Examples - Using FastAPI with Piccolo.
- Piccolo Admin - A powerful and modern admin GUI, using the Piccolo ORM.
- asyncpgsa - A wrapper around asyncpg for use with SQLAlchemy Core.
- Databases - Async SQL query builder that works on top of the SQLAlchemy Core expression language.
- 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.
- Pydantic-SQLAlchemy - Convert SQLAlchemy models to Pydantic models.
- FastAPI-CamelCase - CamelCase JSON support for FastAPI utilizing Pydantic.
- CamelCase Models with FastAPI and Pydantic - Accompanying blog post from the author of the extension.
- 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 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.
- FastAPI Mail - Lightweight mail system for sending emails and attachments (individual and bulk).
- FastAPI Cache - A simple lightweight cache system.
- FastAPI Contrib - Opinionated set of utilities: pagination, auth middleware, permissions, custom exception handlers, MongoDB support, and Opentracing middleware.
- FastAPI CRUDRouter - A FastAPI router that automatically creates and documents CRUD routes for your models.
- FastAPI Limiter - A request rate limiter for FastAPI.
- FastAPI MQTT - An extension for the MQTT protocol.
- FastAPI Pagination - Pagination for FastAPI.
- FastAPI Plugins - Redis and Scheduler plugins.
- FastAPI ServiceUtils - Generator for creating API services.
- 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.
- 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.
- 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.
- Gitter Chat - Chat with other FastAPI users.
- TestDriven.io FastAPI - Multiple FastAPI-specific articles that focus on developing and testing production-ready RESTful APIs, serving up machine learning models, and more.
- Build The Next Generation Of Python Web Applications With FastAPI - In this episode of Podcast Init, the create of FastAPI, Sebastián Ramirez, shares his motivations for building FastAPI and how it works under the hood.
- FastAPI on PythonBytes - Nice overview of the project.
- FastAPI has Ruined Flask Forever for Me
- Why we switched from Flask to FastAPI for production machine learning - In-depth look at why you may want to move from Flask to FastAPI.
- Demystifying Authentication with FastAPI and a Frontend - Add token-based authentication.
- Deploy a Dockerized FastAPI App to Google Cloud Platform - A short guide to deploying a Dockerized Python app to Google Cloud Platform using Cloud Run and a SQL instance.
- Deploy Machine Learning Models with Keras, FastAPI, Redis and Docker
- Deploying Iris Classifications with FastAPI and Docker - Dockerizing a FastAPI application.
- Developing and Testing an Asynchronous API with FastAPI and Pytest - Develop and test an asynchronous API with FastAPI, Postgres, Pytest, and Docker using Test-Driven Development.
- FastAPI for Flask Users - Learn FastAPI with a side-by-side code comparison to Flask.
- FastAPI Microservice Patterns - Blog post series with exemplary implementations of microservice patterns.
- Local Development Environment - Skaffold, docker, kubectl and minikube in a nutshell.
- Service discovery in Container Orchestration Platforms - Enabling FastAPI service communication in Kubernetes explained.
- Asynchronous Communication - Enabling loosely coupled services with messaging.
- Application Monitoring - Application metric monitoring with Prometheus and Grafana.
- Serverless Deployment - About the current status of the compatibility between FastAPI and Kubernetes-native FaaS platforms.
- How to deploy your ConvNet classifier with Keras and FastAPI - Deploy a machine learning model via a web-based API.
- How to monitor your FastAPI service - Explains how to implement Application Performance Monitoring (APM) using OpenTelemetry and Datadog/Jaeger.
- Implementing FastAPI Services – Abstraction and Separation of Concerns - FastAPI application and service structure for a more maintainable codebase.
- Introducing FARM Stack - FastAPI, React, and MongoDB - Getting started with a complete FastAPI web application stack.
- Introduction to the FastAPI Python Framework - Quick intro to FastAPI.
- Porting Flask to FastAPI for ML Model Serving - Comparison of Flask vs FastAPI.
- Real-time data streaming using FastAPI and WebSockets - Learn how to stream data from FastAPI directly into a real-time chart.
- Serving Machine Learning Models with FastAPI in Python - Use FastAPI to quickly and easily deploy and serve machine learning models in Python as a RESTful API.
- Using Hypothesis and Schemathesis to Test FastAPI - Apply property-based testing to FastAPI.
- PyConBY 2020: Serve ML models easily with FastAPI - From the talk by Sebastian Ramirez you will learn how to easily build a production-ready web (JSON) API for your ML models with FastAPI, including best practices by default.
- PyCon UK 2019: FastAPI from the ground up - This talk shows how to build a simple REST API for a database from the ground up using FastAPI.
- Building a Stock Screener with FastAPI - A you build a web-based stock screener with FastAPI, you'll be introduced to many of FastAPI's features, including pydantic models, dependency injection, background tasks, and SQLAlchemy integration.
- Building Web APIs Using FastAPI - Use FastAPI to build a web application programming interface (RESTful API).
- FastAPI - A Web Framework for Python - See how to do numeric validations with FastAPI.
- FastAPI vs. Django vs. Flask - Which framework is best for Python in 2020? Which uses async/await the best? Which is the fastest?
- Serving Machine Learning Models As API with FastAPI - Build a machine learning API with FastAPI.
- Test-Driven Development with FastAPI and Docker - Learn how to build, test, and deploy a text summarization microservice with Python, FastAPI, and Docker.
- Modern APIs with FastAPI and Python - A course designed to get you creating new APIs running in the cloud with FastAPI quickly.
- Full Web Apps with FastAPI Course - You'll learn to build full web apps with FastAPI, equivalent to what you can do with Flask or Django.
(Platforms-as-a-Service)
- Heroku (Step-by-step tutorial, ML model on Heroku tutorial)
- AWS Elastic Beanstalk
- Google App Engine
- Microsoft Azure App Service
- Deta (example)
(Infrastructure-as-a-Service)
Frameworks:
- Chalice
- Mangum - Adapter for running ASGI applications with AWS Lambda and API Gateway.
- Vercel - (formerly Zeit) (example).
- Zappa
Compute:
- Full Stack FastAPI and PostgreSQL - Base Project Generator - Full stack, modern web application generator, which includes FastAPI, PostgreSQL, Docker, Celery, Vue frontend, automatic HTTPS and more (developed by the creator of FastAPI, Sebastián Ramírez).
- FastAPI and Tortoise ORM - Powerful but simple template for web APIs w/ FastAPI (as web framework) and Tortoise-ORM (for working via database without headache).
- FastAPI Model Server Skeleton - Skeleton app to serve machine learning models production-ready.
- cookiecutter-spacy-fastapi - Quick deployments of spaCy models with FastAPI.
- cookiecutter-fastapi - Cookiecutter template for FastAPI projects using: Machine Learning, Poetry, Azure Pipelines and pytest.
- openapi-python-client - Generate modern FastAPI Python clients (via FastAPI) from OpenAPI.
- Pywork - Yeoman generator to scaffold a FastAPI app.
- 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.
- fastapi-gino-arq-uvicorn - Template for a high-performance async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (w/ Redis and PostgreSQL).
- FastAPI and React Template - Full stack cookiecutter boilerplate using FastAPI, TypeScript, Docker, PostgreSQL, and React.
- FastAPI Nano - Simple FastAPI template with factory pattern architecture.
- inboard - Docker images to power your FastAPI apps and help you ship faster.
- FastAPI Cookiecutter Template for building Python 3.9+ FastAPI REST API applications using best practices and design patterns: Async database access (Encode Databases), Correct
ASGI Lifespan
events management, Docker image for deployment based on multi-stage builds, Session management, Cache using Redis (aioredis), Asynchronous tests based on httpx and alt-pytest-asyncio, creates Mercurial/Git hooks forpre-commit
andpre-push
events, etc.
- Awesome FastAPI Projects - Organized list of projects that use FastAPI.
- Bitcart - Platform for merchants, users and developers which offers easy setup and use.
- Coronavirus-tg-api - API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak.
- Dispatch - Manage security incidents.
- FastAPI CRUD Example:
- 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.
- JSON-RPC Server - JSON-RPC server based on FastAPI.
- Mailer - Dead-simple mailer micro-service for static websites.
- OPAL (Open Policy Administration Layer) - Real-time authorization updates on top of Open-Policy; built with FastAPI, Typer, and FastAPI WebSocket pub/sub.
- 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.
NOTE: This project is powered by TestDriven.io. Please support this open source project by purchasing our FastAPI course: Test-Driven Development with FastAPI and Docker.