# System map — encode/starlette

> Canonical page: https://codevetter.com/unpack/starlette/system-map

# System map — encode/starlette

Scanned commit 4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The runtime contract is ASGI: a server supplies a mutable scope and asynchronous receive/send channels. Starlette composes a router and middleware, while individual components can also act as ASGI applications. State is held in application or connection mappings, upload temporary files, and signed client cookies; database selection belongs to consuming applications. Packaging and documentation deployment are separate from serving developer applications.
- ASGIApp is Callable[[Scope, Receive, Send], Awaitable[None]]; users instantiate Starlette and supply an external ASGI server, illustrated by uvicorn main:app. — [starlette/types.py#L12-L22](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/types.py#L12-L22) [README.md#L54-L81](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/README.md#L54-L81)
- Starlette.__call__ sets scope['app'] and lazily caches a stack ordered as ServerErrorMiddleware, optional RequestBodyLimitMiddleware, user middleware, ExceptionMiddleware, then Router. — [starlette/applications.py#L63-L96](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/applications.py#L63-L96)
- Router.app handles HTTP, WebSocket, and lifespan scopes; Route, WebSocketRoute, Mount, and Host provide endpoint adaptation, subapplication composition, and host-based dispatch. — [starlette/routing.py#L199-L242](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/routing.py#L199-L242) [starlette/routing.py#L299-L327](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/routing.py#L299-L327) [starlette/routing.py#L370-L390](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/routing.py#L370-L390) [starlette/routing.py#L468-L478](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/routing.py#L468-L478)
- Synchronous endpoints and background callbacks cross into AnyIO worker threads through run_in_threadpool; synchronous streaming iterators use iterate_in_threadpool. — [starlette/routing.py#L47-L65](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/routing.py#L47-L65) [starlette/concurrency.py#L32-L59](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/concurrency.py#L32-L59) [starlette/background.py#L12-L23](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/background.py#L12-L23) [starlette/responses.py#L225-L243](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/responses.py#L225-L243)
- State wraps an in-memory dictionary, multipart uploads use SpooledTemporaryFile, and SessionMiddleware stores signed JSON in cookies; documentation leaves database implementation to the consuming application. — [starlette/datastructures.py#L664-L695](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/datastructures.py#L664-L695) [starlette/formparsers.py#L222-L240](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/formparsers.py#L222-L240) [starlette/middleware/sessions.py#L50-L78](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/starlette/middleware/sessions.py#L50-L78) [docs/database.md#L1-L10](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/docs/database.md#L1-L10)
- The package requires Python >=3.11, anyio>=4,<5, and conditional typing_extensions; the full extra adds itsdangerous, Jinja2, OpenTelemetry API, python-multipart, PyYAML, httpx, and httpx2. — [pyproject.toml#L12-L12](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/pyproject.toml#L12-L12) [pyproject.toml#L33-L47](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/pyproject.toml#L33-L47)
- Hatchling builds the distribution using the version in starlette/__init__.py; scripts/install uses uv sync --frozen, scripts/check runs version consistency, Ruff and mypy checks, and scripts/build runs uv build, Twine, and Zensical. — [pyproject.toml#L1-L3](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/pyproject.toml#L1-L3) [pyproject.toml#L86-L111](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/pyproject.toml#L86-L111) [scripts/install#L1-L5](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/scripts/install#L1-L5) [scripts/build#L1-L7](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/scripts/build#L1-L7)
- Publish CI builds package and documentation artifacts, publishes PyPI only for tags, and deploys documentation to GitHub Pages and Cloudflare; wrangler.toml points Cloudflare assets at ./site. — [.github/workflows/publish.yml#L27-L48](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/.github/workflows/publish.yml#L27-L48) [.github/workflows/publish.yml#L64-L97](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/.github/workflows/publish.yml#L64-L97) [.github/workflows/publish.yml#L99-L121](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/.github/workflows/publish.yml#L99-L121) [wrangler.toml#L1-L7](https://github.com/encode/starlette/blob/4e7fc04e5f2c69f60e418ff2107d0f6d9a0fe423/wrangler.toml#L1-L7)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
