repowiselitestar-org/litestar

litestar-org / litestar Architecture and code health

Light, flexible and extensible ASGI framework | Built to scale

Python★ 8,529

github.com/litestar-org/litestarIndexed at 716f8b0Up to date with upstreamRefreshes on every push

What is litestar?

litestar is an ASGI framework for building APIs in Python. It validates and parses request data using the type hints on route handlers, and it uses those same type hints to generate OpenAPI schemas. Its core features include dependency injection, middleware, route guards and a plugin system, and it is written in Python.

Written by a model from the README and the source

1,168 files and 7,072 symbols in 8 modules, led by Python (1,132 files) and JavaScript (3).

Code health

8.7out of 10Excellent

Hotspots average 4.8, the place fixes pay off most.

On the leaderboards:#1 of 8 Python web frameworks#1 of 56 Python repos

Use litestar-org/litestar in your agent

Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.

  1. 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
  2. 2.Paste the server URL below as the Remote MCP server URL, then click Add.
  3. 3.Click Connect. A Repowise sign-in window opens. Approve access.
  4. 4.Repowise's tools are now available in your Claude chats.

Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.

Docs
bash
https://api.repowise.dev/mcp/litestar-org/litestar
Editors need an API key: sign in to create one.Sign in to connect

This repo is public, so anyone with a Repowise account and an API key can connect.

Try asking

  • get_risk(["litestar/_openapi/schema_generation/schema.py"])
  • get_answer("how is litestar put together?")
  • get_why("why is litestar structured this way?")

Explore litestar

Key features of litestar

  • Dependency injection with named dependencies, sync or async, defined at different levels of the application.
  • Route guards for authorization that validate a request before the route handler is called.
  • OpenAPI 3.1 schema generation, with API documentation served through Scalar, Redoc, Stoplight Elements and Swagger-UI.
  • Middleware for CORS, CSRF, rate limiting, GZip, Brotli and Zstd compression, and client- and server-side sessions.
  • A plugin system with a built-in SQLAlchemy plugin that lets SQLAlchemy declarative classes be used as type parameters and return values.

How litestar-org/litestar works

Applications are created as a Litestar object defined in litestar/app.py, and route handlers are passed to it through the route_handlers argument. Handlers are plain functions or class-based controllers, and the package entry point litestar/__init__.py is where public names such as Litestar and get are imported from. Type hints on handler signatures drive validation, parsing and OpenAPI generation, and the code index lists litestar/_kwargs/kwargs_model.py and litestar/typing.py as hotspot files for how handler arguments and types are handled. Guards and middleware run around handlers, and named dependencies are injected into handler arguments. The command line interface in litestar/cli/main.py provides the litestar run command. Tests sit in the tests/ directory, including tests/unit/test_openapi/test_schema.py, which covers OpenAPI generation.

The codebase has 1,168 files and 7,072 symbols in 8 modules, led by Python, JavaScript and Luau. Code health is 8.7 out of 10, rated excellent.

Getting started with litestar

  1. Install the litestar package from PyPI.
    pip install litestar
  2. Optionally install the CLI and the uvicorn server for running your application.
    pip install 'litestar[standard]'
  3. Create an app file containing the hello world example, with a route handler at / and an app object built from Litestar.
  4. Run the application with the CLI.
    litestar run

Commands copied from the README

litestar-org/litestar FAQ

What is litestar?

litestar is an ASGI framework focused on building APIs in Python. It offers data validation, dependency injection, SQLAlchemy integration, route guards and middleware.

How does litestar work?

litestar uses the type hints on route handlers to validate and parse request data and to generate OpenAPI schemas. Route handlers are registered with a Litestar application, and guards, middleware and dependencies run around them.

How do I install litestar?

Install litestar with pip install litestar. Running pip install 'litestar[standard]' also adds the CLI and the uvicorn server.

What language is litestar written in?

litestar is written in Python. The repository also contains JavaScript, Luau, Dockerfile and Makefile files.

How is the litestar code organized?

The litestar/ directory holds the framework package, and the command line interface lives in litestar/cli/. The tests/, docs/ and test_apps/ directories hold the test suite, documentation and test applications.

Who is litestar for?

litestar is for developers building APIs in Python with ASGI. It is typed throughout, so a route handler that omits a return type raises an exception.

What license does litestar use?

litestar is licensed under the MIT license, with the SPDX identifier MIT.

The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.

About this page

Get a page like this for your own codebase

Repowise built this map of litestar-org/litestar from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Index your repo freeSee how Repowise worksFree for 2 public repos, with a page like this one.

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.