Pythie
CategoriesTrending
An open index of Python tools.Pythie’s IndexLegal noticePrivacyData: PyPI (package metadata; download statistics under CC BY 4.0, via ClickHouse), deps.dev (CC BY 4.0), GitHub, OSV.

starlette

1.10.0ActivePythie’s Index: 90

The little ASGI library that shines.

Actively maintained. Last release 5 weeks ago, commits in 18 of the last 26 weeks. A safe choice.

Web Frameworks
$pip install starlette
Kludex/starletteDocsPyPI

starlette-logo

✨ The little ASGI framework that shines. ✨


Build Status Package version Supported Python Version Discord


Documentation: https://starlette.dev

Source Code: https://github.com/Kludex/starlette


Starlette

Starlette is a lightweight ASGI framework/toolkit, which is ideal for building async web services in Python.

It is production-ready, and gives you the following:

  • A lightweight, low-complexity HTTP web framework.
  • WebSocket support.
  • In-process background tasks.
  • Startup and shutdown events.
  • Test client built on httpx2.
  • CORS, GZip, Static Files, Streaming responses.
  • Session and Cookie support.
  • 100% test coverage.
  • 100% type annotated codebase.
  • Few hard dependencies.
  • Compatible with asyncio and trio backends.
  • Great overall performance against independent benchmarks.

Installation

$ pip install starlette

You'll also want to install an ASGI server, such as uvicorn or any of the other ASGI server implementations.

$ pip install uvicorn

Example

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


async def homepage(request):
    return JSONResponse({'hello': 'world'})

routes = [
    Route("/", endpoint=homepage)
]

app = Starlette(debug=True, routes=routes)

Then run the application using Uvicorn:

$ uvicorn main:app

Dependencies

Starlette only requires anyio, and the following are optional:

  • httpx2 - Required if you want to use the TestClient.
  • jinja2 - Required if you want to use Jinja2Templates.
  • opentelemetry-api - Required for OpenTelemetryMiddleware.
  • python-multipart - Required if you want to support form parsing, with request.form().
  • itsdangerous - Required for SessionMiddleware support.
  • pyyaml - Required for SchemaGenerator support.

You can install all of these with pip install starlette[full].

Framework or Toolkit

Starlette is designed to be used either as a complete framework, or as an ASGI toolkit. You can use any of its components independently.

from starlette.responses import PlainTextResponse


async def app(scope, receive, send):
    assert scope['type'] == 'http'
    response = PlainTextResponse('Hello, world!')
    await response(scope, receive, send)

Run the app application in example.py:

$ uvicorn example:app
INFO: Started server process [11509]
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

Run uvicorn with --reload to enable auto-reloading on code changes.

Modularity

The modularity that Starlette is designed on promotes building reusable components that can be shared between any ASGI framework. This should enable an ecosystem of shared middleware and mountable applications.

The clean API separation also means it's easier to understand each component in isolation.


Starlette is BSD licensed code.
Designed & crafted with care.

— ⭐️ —

Popularity

Downloads / month
722.7M
GitHub stars
12.8K
Downloads, last 7 days
168.5M-1%
Stars, last 7 days
–
Direct dependents
3.2K
All dependents
56.5K

Pythie’s Index

How it works
90

Healthy

Maintenance, out of 100

  • Recent release

    last release 35 days ago

  • Commit activity

    18/26 weeks with commits

  • Release cadence

    20 releases in 12 months

  • Issues & PRs handled

    87% closed in the past year

  • Contributor spread

    35 authors in last 100 commits

  • OpenSSF Scorecard

    not evaluated

Commits, last 26 weeks177

Releases

Latest
1.10.0
Released
Oct 24, 2026
Releases, 12 months
20
First release
Jun 25, 2018

Compatibility

Requires Python
>=3.11
Tested on
3.11 · 3.12 · 3.13 · 3.14 · 3.15
License
BSD-3-Clause (Permissive)

Keywords

pythonasyncwebsocketshttpasgi

Alternatives

Use instead of starlette: tools that do the same job, closest first.

Compare with aiohttp →Compare with falcon →Compare with Quart →Compare all 4 →

  • aiohttp3.14.5ActivePythie’s Index: 83

    Async http client/server framework (asyncio)

    HTTP & NetworkingWeb Frameworks16.6K568.6M/moReleased Oct 11, 2026
  • falcon4.4.0ActivePythie’s Index: 88

    The ultra-reliable, fast ASGI+WSGI framework for building data plane APIs at scale.

    Web Frameworks9.8K1.7M/moReleased Sep 30, 2026
  • Quart0.23.1ActivePythie’s Index: 69

    A Python ASGI web framework with the same API as Flask

    Web FrameworksAsync & Concurrency3.7K2.9M/moReleased Aug 29, 2026
  • litestar2.25.0ActivePythie’s Index: 85

    Litestar - A production-ready, highly performant, extensible ASGI API Framework

    Web FrameworksValidation & Serialization8.6K1.8M/moReleased Oct 18, 2026
  • sanic25.12.1ActivePythie’s Index: 41

    A web server and web framework that's written to go fast. Build fast. Run fast.

    Web Frameworks18.6K1.1M/moReleased May 31, 2026
  • tornado6.6.1ActivePythie’s Index: 92

    Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

    Web FrameworksAsync & Concurrency22.2K123.5M/moReleased Nov 9, 2026

Works well with

Use together with starlette: extensions, drivers, servers and companion tools.

  • uvicornPythie’s Index: 84The lightning-fast ASGI server.694.8M downloads/mo
  • gunicornPythie’s Index: 82WSGI HTTP Server for UNIX127.5M downloads/mo
  • fastapiPythie’s Index: 86FastAPI framework, high performance, easy to learn, fast to code, ready for production561.9M downloads/mo
  • sse-starlettePythie’s Index: 85SSE plugin for Starlette356.9M downloads/mo
  • slowapiPythie’s Index: 43A rate limiting extension for Starlette and Fastapi25.2M downloads/mo
  • granianPythie’s Index: 83A Rust HTTP server for Python applications14.1M downloads/mo