repowiserepowise

Library

litestar-org / litestar

Light, flexible and extensible ASGI framework | Built to scale

PythonMIT

github.com/litestar-org/litestarIndexed Refreshes on every push

What is litestar?

litestar is an ASGI framework for building APIs in Python, described as light, flexible and extensible. It defines endpoints as route handlers, either functions or class-based controllers, and uses their type hints to validate and parse incoming data. Litestar's code is written in Python and includes validation, dependency injection, route guards, middleware and OpenAPI schema generation. To install it, run pip install litestar and follow the steps below. Its code health is 9.0 out of 10 (Excellent), ranked #17 of 265 ranked repos. The last commit to litestar was on Nov 23, 2026, and 317 people have contributed.

As of commit b68d296, indexed Nov 23, 2026. What it is comes from a model reading the README; the rest is measured from the source and git history, not from the maintainer.

For agentslitestar.md

Repo facts: type, license, health, rank, contributors
litestar facts
TypeLibrary
LicenseMIT
Code health9.0 / 10 (Excellent)
Health rank#17 of 265 ranked repos
Last commitNov 23, 2026
Contributors317
Bus factor2
Size1,182 files, 91,778 lines

Ask about litestar

Answers come from litestar's README and source, with the files they cite. Two free answers a day without an account.

Install litestar

Commands copied from the README

  1. 1Install the core package with pip.
    pip install litestar
  2. 2Run the application with the litestar command.
    litestar run

Releases on GitHub (latest v2.25.0, Oct 18, 2026)

Full install notes on GitHub

Ask about this code in your agent

This connects Repowise to litestar's code. It does not install litestar. To install litestar, use the install steps.

Useful if you want to change or fork litestar: your agent can ask how it is put together and get answers that cite its files.

Explore litestar

Code health

9.0out of 10Excellent

Hotspots average 7.7, the place fixes pay off most.

9.0 to 9.0 over the last 5 indexes

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

litestar-org/litestar FAQ

What is litestar?

litestar is an ASGI framework for building APIs in Python, described as light, flexible and extensible. It provides data validation, dependency injection, route guards, middleware and OpenAPI schema generation.

How does litestar work?

litestar builds an application from route handlers whose type hints are used to validate and parse request data. Guards and middleware wrap the handler call, and the same type information is used to generate the OpenAPI schema.

How do I install litestar?

litestar is installed with pip install litestar. Installing pip install 'litestar[standard]' also adds the CLI and the uvicorn server for running an application with litestar run. See the install steps

What language is litestar written in?

litestar is written in Python, and its repository contains 1145 Python files. The project is published to PyPI under the name litestar.

How is the litestar code organized?

litestar's main package is the litestar directory, which holds 310 files, with app.py as its central application module. Tests and documentation are kept in separate top-level directories named tests and docs.

Who is litestar for?

litestar is for building APIs, and it includes typed validation, dependency injection, an SQLAlchemy plugin and OpenAPI documentation out of the box. It is a framework for Python developers who want typed route handlers.

What license does litestar use?

litestar is released under the MIT license, identified as MIT. The license applies to the litestar library code in its repository.

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.

Free for 2 public repos, with a page like this one. No card. See how Repowise works

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

Key features of litestar

  • Class-based controllers and function-based route handlers can both be used to define endpoints.
  • Named dependencies, sync or async, can be defined at different levels of an application and selectively used or overwritten.
  • Route guards are functions defined at app, router or controller level that validate a request before the route handler runs.
  • OpenAPI 3.1 schema generation serves ReDoc, Swagger-UI and Stoplight Elements documentation, all enabled by default.
  • Built-in middleware covers CORS, CSRF, rate limiting, GZip, Brotli and Zstd compression, and client- and server-side sessions.

How litestar-org/litestar works

Requests are handled by a Litestar application object, defined in litestar/app.py, which is constructed from route handlers passed as route_handlers. Route handlers are typed functions or methods on class-based controllers, and their type hints drive data validation, parsing and OpenAPI generation. Dependency injection lives in the litestar/di package, where litestar/di/_route_handler.py is one of the hotspot files, and guards and middleware run around the handler call. OpenAPI generation is implemented in litestar/_openapi, where parameters.py is also a hotspot file that turns handler parameters into schema entries. The litestar/cli/main.py module provides the command line entry point used by litestar run to start an application.

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

Featured answer

Read the answer

Litestar is a light, flexible and extensible ASGI framework for building APIs in Python, maintained in the litestar-org/litestar repository. Endpoints are route handlers, either typed functions or methods on class-based controllers, and their type hints drive data validation, parsing and OpenAPI schema generation. A Litestar application object, defined in litestar/app.py and built from route_handlers, receives requests, with dependency injection in the litestar/di package and guards and middleware running around each handler call. OpenAPI generation lives in litestar/_openapi, where parameters.py turns handler parameters into schema entries, and litestar/cli/main.py provides the entry point behind litestar run. The repository holds 1182 files, with 200 in the Application layer, 415 in Docs & Tooling, and smaller counts in Middleware, Config, Utility, API, Data, Types and CLI. To start reading, open litestar/app.py for the application object, then litestar/di/_route_handler.py for handlers and dependency injection, and litestar/_openapi/parameters.py for schema generation.

Files per layer in litestar9 layers.

Basis: Inferred · knowledge graph· as of b68d296

Repowise maps public repos from their source. Not affiliated with litestar-org. What is Repowise?