app-setup
SKILL.md
App Setup
Use this skill when the user needs to create a new Litestar app, structure an existing app, or configure core application settings.
Workflow
- Define a minimal
Litestar(...)app and register route handlers. - Move handlers into routers as complexity grows.
- Add app-level configuration (
debug,openapi_config,logging_config,dependencies,middleware). - Add lifespan hooks for startup/shutdown needs.
Minimal Pattern
from litestar import Litestar, get
@get("/health")
async def health() -> dict[str, str]:
return {"status": "ok"}
app = Litestar(route_handlers=[health])
Project Pattern
- Create a dedicated
app.pyentrypoint exportingapp. - Keep transport concerns (handlers/routers/controllers) separate from services.
- Register routers/controllers via
route_handlers=[...]on the app.
App-Level Config Checklist
debugfor local development only.openapi_configfor API docs metadata.logging_configfor structured logging.dependenciesfor cross-cutting service injection.middlewarefor request/response policies.- lifespan hooks/events for startup resource initialization and cleanup.
Litestar References
Weekly Installs
1
Repository
alti3/litestar-skillsGitHub Stars
5
First Seen
14 days ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1