lite-bootstrap assists you in creating applications with all the necessary instruments already set up.
With lite-bootstrap, you receive an application with lightweight built-in support for:
sentryprometheusopentelemetrypyroscope- with OpenTelemetry trace-profile linkingstructlogcorsswagger- with additional offline version supporthealth-checks
Those instruments can be bootstrapped for:
Usage examples:
- with LiteStar - litestar-sqlalchemy-template
- with FastAPI - fastapi-sqlalchemy-template
📦 PyPi
📝 License
lite-bootstrap is inspired by microbootstrap — a single package that wires up the common observability stack (sentry, prometheus, opentelemetry, logging, cors, swagger, health-checks) for FastAPI / Litestar / FastStream services and for plain scripts.
The following ideas were borrowed:
- the overall surface — a
Bootstrapperper framework that composes a set of instruments, - the lifecycle model — each instrument has
bootstrap()/teardown()/is_ready()and is skipped when its optional dependency is not installed, - the catalog of supported instruments and supported frameworks.
The following intentionally differ:
- Configuration:
lite-bootstrapuses frozendataclassconfigs (nopydantic/pydantic-settingsruntime dependency), which is what makes it "lite".microbootstrapconfigures everything throughpydantic-settingsmodels. - Granular extras:
lite-bootstrapships onlyorjsonas a runtime dependency; every instrument (sentry,otl,logging,pyroscope) and every framework (fastapi,litestar,faststream) is its own extra, with per-pair combos (fastapi-sentry,litestar-otl,faststream-metrics, …) and*-allrollups. You install only what you actually use.microbootstrapbundles the full observability stack (opentelemetry, sentry-sdk, structlog, pyroscope-io, rich, pydantic-settings, …) as base dependencies and only splits framework packages into extras. - Scope:
lite-bootstrapis deliberately narrow — only instrument wiring. It does not include a Granian server runner or a console writer.