Skip to main content

liteit

License CI PyPI version Python versions Documentation Status

CLI scaffolding for Litestar + Granian ASGI APIs: modular controllers, automatic discovery, OpenAPI/Swagger at /docs, structlog JSON logging, and a production Dockerfile.

Inspired by flaskit (Flask + Flask-Smorest + Bjoern).

Documentation: liteit.readthedocs.io · source under docs/

pip install -e ".[docs]"
python -m mkdocs serve

Requires Python 3.10+ for the CLI. Generated apps target Python 3.11+.

Install

pip install liteit
# or from source
pip install -e .
pip install -e ".[test]"

Then use the liteit command (same as any other CLI). If Windows says the command is not found, your Python Scripts folder is not on PATH — use a venv, or see Installation.

Quick start

liteit init myapi
cd myapi
python -m venv .venv
# activate .venv, then:
pip install -U pip && pip install -r requirements.txt
cp .env.example .env
liteit generate controller users
liteit run --reload

Open http://127.0.0.1:8000/docs for Swagger UI. Health check: GET /health. Full walkthrough: Quick start.

CLI

Command Description
liteit init <project_name> Scaffold a full Litestar project tree
liteit generate controller <name> Create controller + Pydantic schemas (gen alias)
liteit run [--host] [--port] [--reload] [--workers] Serve with Granian (app.main:app)
liteit init myapi
liteit generate controller users
liteit gen controller order_items
liteit run --host 0.0.0.0 --port 8000 --reload

Generated layout

<project_name>/
├── app/
│   ├── main.py              # factory + controller auto-loader
│   ├── config.py            # Pydantic BaseSettings (.env)
│   ├── controllers/         # Litestar Controllers (auto-discovered)
│   ├── schemas/             # Pydantic DTOs
│   └── core/                # logging + JWT stub
├── tests/
├── .env.example
├── .gitignore
├── requirements.txt
├── Dockerfile
└── README.md

Controllers under app/controllers/ are registered automatically — no manual import list.

Blocking vs async: sync def handlers run in Granian's blocking thread pool; async def handlers run on the event loop.

Publish (maintainers)

Push a tag v* to trigger .github/workflows/publish.yml. Set repository secret PYPI_API_TOKEN. Details: Publish.

License

GPL-3.0-or-later. See LICENSE.

Metadata

Release files for liteit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liteit 0.1.0
File Size Uploaded Provenance Actions
liteit-0.1.0.tar.gz 34.0 kB Without provenance Details for liteit-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for liteit 0.1.0
File Interpreter ABI Platform Actions
liteit-0.1.0-py3-none-any.whl Python 3 none any Details for liteit-0.1.0-py3-none-any.whl

Total release size: 64.4 kB

Release files / liteit-0.1.0.tar.gz

Download URL liteit-0.1.0.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5f7e4d8e4f66c2700b68a30076e9847feda19d72063ff796e90492f24b10723b
BLAKE2b-256 checksum
How to use checksums
12d8dc60599d5c74f4d7fafd4c9f4831b0a7a93b6025c6bef3c6a3292e5e8599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / liteit-0.1.0-py3-none-any.whl

Download URL liteit-0.1.0-py3-none-any.whl
Size 30.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
970bb1871fc7deb905f4347101d02bd14ed2fe82fa09f994bebabef7063016d2
BLAKE2b-256 checksum
How to use checksums
991387e7019ab8741a8487acb64f54b76e2787b1c0438d6d464b2515afd7050f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for liteit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page