Convert Figma logo to code with AI

mjhea0 logoawesome-fastapi

A curated list of awesome things related to FastAPI

8,332
638
8,332
6

Top Related Projects

75,446

FastAPI framework, high performance, easy to learn, fast to code, ready for production

10,027

The little ASGI framework that shines. 🌟

Ready-to-use and customizable users management for FastAPI

Backend logic implementation for https://github.com/gothinkster/realworld with awesome FastAPI

A fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin

Quick Overview

Awesome-FastAPI is a curated list of resources, tools, and projects related to FastAPI, a modern, fast (high-performance) Python web framework for building APIs. This repository serves as a comprehensive collection of FastAPI-related content, including tutorials, articles, extensions, and best practices.

Pros

  • Extensive collection of FastAPI resources in one place
  • Regularly updated with new content and contributions
  • Well-organized structure for easy navigation
  • Includes both beginner-friendly and advanced resources

Cons

  • May be overwhelming for absolute beginners due to the large amount of information
  • Some listed resources might become outdated over time
  • Not all listed projects or resources are thoroughly vetted
  • Lacks detailed explanations or comparisons between different resources

Getting Started

To explore the Awesome-FastAPI repository:

  1. Visit the GitHub repository: mjhea0/awesome-fastapi
  2. Browse through the different sections to find resources that interest you
  3. Click on the links to access tutorials, articles, or projects
  4. Consider starring the repository to stay updated with new additions
  5. If you have a valuable resource to add, follow the contribution guidelines to submit a pull request

Competitor Comparisons

75,446

FastAPI framework, high performance, easy to learn, fast to code, ready for production

Pros of FastAPI

  • Official repository with comprehensive documentation and examples
  • Actively maintained by the core development team
  • Contains the actual FastAPI source code and implementation details

Cons of FastAPI

  • May be overwhelming for beginners due to its extensive codebase
  • Focuses primarily on the framework itself, rather than curated resources

Code Comparison

FastAPI (main repository):

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hello World"}

Awesome FastAPI (curated list):

## Official Resources

- [FastAPI](https://github.com/tiangolo/fastapi) - FastAPI framework, high performance, easy to learn, fast to code, ready for production

Summary

FastAPI is the official repository for the FastAPI framework, containing the source code, documentation, and examples. It's actively maintained and provides comprehensive information about the framework's implementation and usage.

Awesome FastAPI is a curated list of FastAPI resources, tools, and projects. It serves as a community-driven collection of helpful links and information for FastAPI developers.

While FastAPI offers the complete framework and documentation, Awesome FastAPI provides a curated selection of resources that can be particularly useful for discovering third-party tools, tutorials, and best practices related to FastAPI development.

10,027

The little ASGI framework that shines. 🌟

Pros of Starlette

  • Full-featured ASGI framework with built-in routing, middleware, and WebSocket support
  • Lightweight and high-performance, suitable for building scalable web applications
  • Serves as the foundation for FastAPI, providing core functionality

Cons of Starlette

  • Steeper learning curve compared to Awesome FastAPI's curated resource list
  • Less focus on API-specific features and documentation
  • Requires more setup and configuration for API development

Code Comparison

Starlette:

from starlette.applications import Starlette
from starlette.responses import JSONResponse
from starlette.routing import Route

async def homepage(request):
    return JSONResponse({"message": "Hello, World!"})

app = Starlette(routes=[Route("/", homepage)])

Awesome FastAPI (using FastAPI):

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
async def root():
    return {"message": "Hello World"}

Summary

Starlette is a powerful ASGI framework that provides a solid foundation for web applications, including FastAPI. It offers more flexibility and lower-level control but requires more setup for API development. Awesome FastAPI, on the other hand, is a curated list of resources for FastAPI, which is built on top of Starlette and provides a more opinionated, API-focused framework with additional features and easier setup for API development.

Ready-to-use and customizable users management for FastAPI

Pros of fastapi-users

  • Focused specifically on user management functionality for FastAPI
  • Provides ready-to-use authentication and user management features
  • Includes built-in support for various database backends

Cons of fastapi-users

  • More limited in scope compared to the broader awesome-fastapi list
  • May require additional customization for specific use cases
  • Less flexibility in choosing alternative user management solutions

Code Comparison

fastapi-users example:

from fastapi_users import FastAPIUsers
from fastapi_users.authentication import JWTAuthentication

fastapi_users = FastAPIUsers(
    user_db,
    [JWTAuthentication(secret="SECRET", lifetime_seconds=3600)],
)

app.include_router(fastapi_users.get_auth_router(JWTAuthentication()), prefix="/auth/jwt")

awesome-fastapi doesn't provide specific code examples, as it's a curated list of FastAPI resources.

Summary

fastapi-users is a specialized library for user management in FastAPI applications, offering out-of-the-box functionality for authentication and user-related features. On the other hand, awesome-fastapi is a comprehensive collection of FastAPI resources, tools, and projects, providing a broader overview of the FastAPI ecosystem. While fastapi-users excels in its specific domain, awesome-fastapi offers a wider range of options and resources for FastAPI development in general.

Backend logic implementation for https://github.com/gothinkster/realworld with awesome FastAPI

Pros of fastapi-realworld-example-app

  • Provides a complete, production-ready example application
  • Implements a full-featured REST API with authentication and database integration
  • Demonstrates best practices for structuring a large FastAPI project

Cons of fastapi-realworld-example-app

  • More complex and potentially overwhelming for beginners
  • Focuses on a specific application structure, which may not fit all use cases
  • Less frequently updated compared to awesome-fastapi

Code Comparison

fastapi-realworld-example-app:

from fastapi import APIRouter, Depends, HTTPException
from starlette.status import HTTP_201_CREATED, HTTP_400_BAD_REQUEST

from app.api.dependencies.authentication import get_current_user_authorizer
from app.api.dependencies.database import get_repository
from app.db.repositories.articles import ArticlesRepository
from app.models.domain.articles import Article
from app.models.schemas.articles import (
    ArticleInCreate,
    ArticleInResponse,
    ArticleInUpdate,
)

router = APIRouter()

awesome-fastapi:

# This repository doesn't contain code examples directly.
# It's a curated list of FastAPI resources, tutorials, and projects.

The fastapi-realworld-example-app provides concrete code examples for implementing a FastAPI application, while awesome-fastapi serves as a comprehensive resource collection without direct code samples.

A fast admin dashboard based on FastAPI and TortoiseORM with tabler ui, inspired by Django admin

Pros of fastapi-admin

  • Provides a complete admin interface solution for FastAPI applications
  • Offers built-in user authentication and permission management
  • Includes customizable UI components and themes

Cons of fastapi-admin

  • More opinionated and less flexible than a curated list of resources
  • Requires learning a specific admin framework, which may not suit all projects
  • Limited to admin functionality, unlike the broader scope of awesome-fastapi

Code Comparison

awesome-fastapi doesn't contain code samples, as it's a curated list. However, fastapi-admin provides code for setting up an admin interface:

# fastapi-admin example
from fastapi_admin.app import app as admin_app
from fastapi_admin.providers.login import UsernamePasswordProvider

admin_app.add_auth_provider(UsernamePasswordProvider(
    login_logo_url="https://preview.tabler.io/static/logo.svg"
))

Summary

awesome-fastapi is a comprehensive resource list for FastAPI developers, offering a wide range of tools, libraries, and examples. It's ideal for developers seeking diverse resources and flexibility in their FastAPI projects.

fastapi-admin, on the other hand, is a specific admin interface solution for FastAPI applications. It provides a ready-to-use admin panel with authentication and UI components, making it suitable for projects requiring quick admin functionality implementation.

The choice between these repositories depends on the project's needs: general FastAPI resources (awesome-fastapi) or a dedicated admin solution (fastapi-admin).

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

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

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.
  • 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).
  • Prisma Client Python - An auto-generated, fully type safe ORM powered by Pydantic and tailored specifically for your schema - supports SQLite, PostgreSQL, MySQL, MongoDB, MariaDB and more.
  • 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

Developer Tools

Email

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

Utils

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 - This Docker image provides a platform to run FastAPI using Gunicorn with Uvicorn workers. It provides Poetry for managing dependencies and setting up a virtual environment in the container.
  • uvicorn-poetry - This Docker image provides a platform to run FastAPI with Uvicorn on Kubernetes container orchestration system. It provides Poetry for managing dependencies and setting up a virtual environment in the container.

Open Source Projects

Sponsors

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