Starlette

A lightweight ASGI framework/toolkit for building async web services and apps in Python

Framework
PyPI
v1.7.0
12,639 stars
BSD 3-Clause License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
94 /100 Excellent
Development Activity 100
Maintenance 100
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
78 /100 Good
Architecture 85
Code Quality 85
Innovation 70
Learning Curve 72

Starlette is a lightweight ASGI framework and toolkit for building high-performance async web services in Python. It provides the core primitives every ASGI app needs — routing, request/response objects, middleware, WebSockets, background tasks, and a test client — without imposing a large amount of structure on top, making it usable either directly or as the foundation other frameworks build on.

FastAPI is the most visible consumer of Starlette, using it for all of the underlying HTTP/WebSocket handling while layering in validation and OpenAPI generation; but Starlette itself is designed to be used standalone for services that need async performance without a full-featured framework’s opinions.

What You Get

  • ASGI-native routing with path parameters, mounting, and WebSocket routes
  • Request/Response objects, form/multipart parsing, and streaming responses
  • A composable middleware stack (CORS, GZip, sessions, trusted host, etc.)
  • Native async WebSocket support and background task scheduling
  • A TestClient built on httpx for synchronous-style testing of async apps
  • Static file serving and Jinja2 templating integration

Common Use Cases

  • Building lightweight async microservices or internal APIs without a heavier framework
  • Serving as the ASGI foundation underneath higher-level frameworks (as FastAPI does)
  • Building real-time services that need native WebSocket routing and handling
  • Adding async middleware (CORS, auth, sessions) to an existing ASGI application

Under The Hood

Architecture - applications.py assembles a Starlette app from a middleware stack (middleware/), a Router (routing.py) that dispatches ASGI scope/receive/send calls to endpoint callables or classes (endpoints.py), with request parsing (requests.py, formparsers.py) and response construction (responses.py) as thin, composable layers around the raw ASGI interface. Tech Stack - Pure-Python, dependency-light (optional extras for httpx, jinja2, python-multipart, itsdangerous depending on features used), built and packaged via modern pyproject.toml/uv tooling, deployed under any ASGI server (Uvicorn, Hypercorn, Daphne). Code Quality - A large, well-organized tests/ directory (26+ files) covers routing, middleware, WebSockets, static files, and exception handling individually, and the project enforces type checking (py.typed) and consistent style across a 300+ contributor codebase. API Design - The Starlette(routes=[...]) constructor and decorator-free route definitions keep the surface small and explicit; because it’s intentionally low-level, using it directly requires more boilerplate than a batteries-included framework, but that same minimalism is what makes it easy to build other frameworks on top of.

Used by 21 apps in this directory

Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python 89%
Updated 4 days ago
Python
70%
Apache 2.0

GPT Researcher

AI Assistants · Productivity

29,650

The pioneering open-source autonomous AI agent that conducts deep, multi-source research and produces citation-backed reports exceeding 2,000 words — faster and more reliably than any human researcher.

View details
91
Repo Health
91
Technical
63
Dependency
Built with
Python 70%
TypeScript 18%
Updated 6 days ago
Python
100%
MIT

Graphify

AI Agents

121,917

A YC-backed, open-source knowledge graph skill for AI coding assistants — type /graphify and it maps your entire project (code, docs, PDFs, images, videos) into a queryable graph instead of grepping through files.

View details
83
Repo Health
73
Technical
72
Dependency
Built with
Python 100%
Updated 5 days ago
Python
82%
Apache 2.0

headroom

AI Development · Developer Tools

73,966

Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.

View details
85
Repo Health
86
Technical
69
Dependency
Built with
Python 82%
Rust 12%
Updated 5 days ago
TypeScript
91%
Apache 2.0

Helicone

AI Development · Analytics · Monitoring

6,182

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
70
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 91%
Updated 2 weeks ago
Python
86%
Apache 2.0

knowhere

AI Development · AI Memory · Developer Tools

3,541

Transform messy, unstructured documents into persistent, navigable memory that AI agents can actually use.

View details
82
Repo Health
75
Technical
66
Dependency
Built with
Python 86%
HTML 14%
Updated 1 weeks ago
Python
82%
MIT

LiteLLM

AI Development · Developer Tools

59,745

Open source AI gateway and Python SDK that gives you one OpenAI-compatible interface to call 100+ LLM providers, with built-in routing, cost tracking, guardrails, and virtual keys.

View details
92
Repo Health
81
Technical
69
Dependency
Built with
Python 82%
TypeScript 12%
Updated 4 days ago
TypeScript
56%
Apache 2.0

LTX-Desktop

AI Design Tools · Video Editors

2,028

An open-source Electron app that runs LTX-2 text-to-video, image-to-video, and video editing models locally on your GPU, or via a cloud API when your hardware can't keep up.

View details
72
Repo Health
82
Technical
73
Dependency
Built with
TypeScript 56%
Python 41%
Updated 1 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers