fastapi

fastapi: Build APIs with Python type hints

FastAPI is a Python web framework for building HTTP APIs from standard type annotations. It validates and converts request data and generates OpenAPI documentation, making it a fit for teams that want typed API development with interactive docs.

View on GitHub Compare
Stars
103k
Forks
10k
Stars, last 30 days
+1,782

Our take

Health score

80/100

How it is scored
Activity
88
Community
79
Issues
79
Pull requests
72

+1,782 stars in the last 30 days

  • Releases more often than 92% of the projects we track
  • Closes issues faster than 81% of the projects we track
  • More contributors than 78% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

105,008

Forks

10,402

Change since Nov 17, 2026: +189 stars·+87 forks

Overview

FastAPI is a Python framework for building HTTP APIs. It uses standard Python type hints to describe inputs and outputs, then uses those declarations for data validation, conversion, and OpenAPI schema generation.

It is aimed at developers who want typed API code without maintaining separate validation and documentation definitions. Built on Starlette for web functionality and Pydantic for data handling, it supports both synchronous and asynchronous endpoints.

Key Features

  • Declare path, query, and request-body data with Python types and Pydantic models.
  • Validate incoming data and return clear errors for invalid values.
  • Convert data between network formats such as JSON and Python types.
  • Generate OpenAPI specifications and interactive documentation using Swagger UI and ReDoc.
  • Support synchronous and asynchronous endpoint functions.
  • Provide dependency injection, security integrations, WebSockets, and testing support through FastAPI and Starlette.

Use Cases

  • Backend developers building REST APIs who want validation and API schemas derived from their endpoint definitions.
  • Teams creating services that accept nested JSON payloads and benefit from typed data models.
  • Developers building asynchronous Python services that need HTTP endpoints and WebSocket support.
  • API teams that want interactive documentation and OpenAPI output for exploration or client generation.

Getting Started

Install the standard dependencies with:

uv add "fastapi[standard]"

See the README and official documentation for setup and usage details.

Alternatives

  • air: Air focuses on server-rendered HTML with typed Python elements and HTMX, while FastAPI centers on typed HTTP APIs and OpenAPI documentation.
ProjectLanguageLicenseStarsStatus
fastapiPythonMIT103kNot checked yet
airPythonMIT920Active

Considerations

  • FastAPI relies on Pydantic and Starlette, so their concepts and behavior are part of the framework’s foundation.
  • The standard installation includes optional dependencies such as Uvicorn and the FastAPI CLI. Install the base package instead if you do not need them.
  • The README describes FastAPI as high performance, but actual results depend on the application and deployment setup.
  • The project is licensed under MIT, and its repository is not archived.

Found this useful?

Share it with someone who would like fastapi.

Comparisons