OSS TanbouSign in with GitHub

build asynchronous Python web services from lightweight ASGI components

OSS scale score 279.7OSS health 100
About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
12,655
Primary language
Python
License
BSD-3-Clause
Repository last updated
Oct 5, 2026
On this page

Overview

Starlette is a lightweight ASGI framework and toolkit for Python. It provides routing, WebSockets, background tasks, lifecycle handling, CORS, GZip, static files, streaming responses, sessions, and related primitives for composing asynchronous web services.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Compose HTTP, WebSocket, and middleware behavior at the component level

Routing, HTTP responses, WebSockets, background tasks, CORS, GZip, static files, streaming responses, and sessions can be used as separate components. Starlette can act as a complete framework or as an ASGI toolkit from which applications select only the pieces they need.

Sources: [2]

Keep required dependencies small and add optional capabilities deliberately

Starlette 1.7.0 centers its required dependency set on AnyIO 4. TestClient, Jinja2 templates, OpenTelemetry, multipart form parsing, sessions, and schema generation use optional dependencies selected by the application.

Sources: [2][3]

Best fit

Fits asynchronous backends that want explicit ASGI building blocks

It is useful when a service prefers explicit HTTP, WebSocket, and middleware boundaries over a larger full-stack architecture, or when reusable ASGI components need to be shared across applications.

Sources: [2]

Before adoption

Require Python 3.10+ and AnyIO 4, and treat OpenTelemetry middleware as experimental

Starlette 1.7.0 requires Python 3.10 or newer and AnyIO 4. Its OpenTelemetryMiddleware is explicitly experimental, and the release notes warn that its API and emitted telemetry may change in minor releases without a deprecation period.

Sources: [3][4]

Official sources

  1. [1]Kludex/starlette — GitHub repository(2026-10-06)
  2. [2]Starlette 1.7.0 — README(2026-10-06)
  3. [3]Starlette 1.7.0 — pyproject.toml(2026-10-06)
  4. [4]Starlette 1.7.0 release(2026-10-06)
  5. [5]Starlette BSD-3-Clause license(2026-10-06)
Supplemental curator note

Starlette fits teams that want HTTP, WebSocket, and middleware primitives at ASGI granularity rather than a full-stack bundle. Its small dependency surface leaves database, authentication, and other surrounding architecture as explicit application choices.

Try it in 3 steps

  1. 1

    Install Starlette 1.7.0 and Uvicorn

    Pin the reviewed Starlette release and the ASGI server recommended by its README. Python 3.10 or newer is required.

    python -m pip install "starlette==1.7.0" "uvicorn==0.54.0"
  2. 2

    Create a minimal Starlette application

    Save a minimal version of the routing example from the official README as main.py.

    cat > main.py <<'PY' from starlette.applications import Starlette from starlette.responses import JSONResponse from starlette.routing import Route async def homepage(request): return JSONResponse({'hello': 'world'}) app = Starlette(routes=[Route('/', homepage)]) PY
  3. 3

    Start the application with an ASGI server

    Start Uvicorn, then open http://127.0.0.1:8000/ from another terminal or browser and confirm the JSON response.

    uvicorn main:app
Check the official README

Growth

Growth trends · Last 30 days

12,655 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • asgi
  • async
  • http
  • python
  • websockets
Stars
12,655
Forks
1,361
Watchers
100
Open issues
58
Contributors
340
Owner type
User
Primary language
Python
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?