repowiselitestar-org/litestar

Architecture of litestar-org/litestar

litestar-org/litestar is 1,168 source files holding 7,072 symbols across 8 modules, written mainly in Python, JavaScript, Luau. The largest module is tests, with 407 files, and 14 files are entry points into the dependency graph.

How litestar fits together

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.

Largest modules

  • tests: 407 files and 36,169 lines of code
  • docs: 396 files and 7,267 lines of code
  • litestar: 310 files and 37,472 lines of code
  • test_apps: 15 files and 127 lines of code
  • tools: 8 files and 823 lines of code
  • .github: 2 files and 60 lines of code
  • .devcontainer: 1 file and 10 lines of code
  • root: 1 file and 119 lines of code

Languages

By file count: Python 1,132 files, JavaScript 3 files, Luau 3 files, Dockerfile 1 file, Makefile 1 file.

Documentation

Repowise documents litestar in 1,214 pages generated from the source.

More on litestar: summary and FAQ, codebase overview, code health.