starlette

Build asynchronous web services with Starlette's ASGI toolkit and uvicorn.

682|49|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/simonw/research --skill starlette
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: starlette
Source: https://github.com/simonw/research/tree/main/starlette-1-skill
Command: npx skills add https://github.com/simonw/research --skill starlette

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Starlette provides a lightweight ASGI toolkit for building high-performance async web services in Python.

Core Features & Use Cases

  • Routing, requests/responses, and WebSockets
  • Templates, static files, middleware, and lifespan events
  • Background tasks and modular ASGI usage (pure toolkit)
  • OpenAPI/schema generation and integration with uvicorn for serving apps

Quick Start

Create a minimal Starlette app with Route and run it with uvicorn to serve an async API.

Frequently Asked Questions about starlette

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a fast async web service using an ASGI toolkit?

Build fast async web services using a lightweight ASGI toolkit by defining routing, requests, and responses. It requires Python 3.10+ and minimal dependencies to create production-grade APIs.

Can I handle WebSockets and background tasks with Starlette?

Yes, Starlette supports WebSockets and background tasks. You can handle real-time WebSockets alongside templates, static files, and middleware within a single lightweight ASGI application.

Does Starlette require uvicorn to serve async web applications?

Starlette is a pure ASGI toolkit and requires an ASGI server like uvicorn to serve async web applications. The integration with uvicorn is demonstrated for running your fast async APIs.

How do I generate OpenAPI schemas for my async web routes?

Generate OpenAPI schemas for your async web routes using the built-in OpenAPI support. Starlette provides schema generation alongside routing and middleware for production-grade APIs.

What is the best way to manage lifespan events and middleware in an ASGI app?

Manage lifespan events and middleware in an ASGI app by utilizing Starlette's modular toolkit. It handles lifespan events, custom middleware, and background tasks for scalable web services.