Skip to content

Latest commit

Β 

History

History
53 lines (38 loc) Β· 3.3 KB

File metadata and controls

53 lines (38 loc) Β· 3.3 KB

Lite-Bootstrap

Test Coverage Supported versions downloads GitHub stars

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:

  • sentry
  • prometheus
  • opentelemetry
  • pyroscope - with OpenTelemetry trace-profile linking
  • structlog
  • cors
  • swagger - with additional offline version support
  • health-checks

Those instruments can be bootstrapped for:


Usage examples:

πŸ“š Documentation

πŸ“¦ PyPi

πŸ“ License

Acknowledgements

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 Bootstrapper per 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-bootstrap uses frozen dataclass configs (no pydantic / pydantic-settings runtime dependency), which is what makes it "lite". microbootstrap configures everything through pydantic-settings models.
  • Granular extras: lite-bootstrap ships only orjson as 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 *-all rollups. You install only what you actually use. microbootstrap bundles 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-bootstrap is deliberately narrow β€” only instrument wiring. It does not include a Granian server runner or a console writer.