{"repo":"modern-python/lite-bootstrap","free":true,"listed":false,"github":"https://github.com/modern-python/lite-bootstrap","clone":"git clone https://github.com/modern-python/lite-bootstrap.git","description":"Lightweight bootstrap for production-ready Python microservices","language":"Python","stars":12,"topics":["bootstrap","cors","fastapi","faststream","healthcheck","litestar","opentelemetry","prometheus","sentry","swagger"],"license":"MIT","category":"analytics","readme_excerpt":"lite-bootstrap wires production observability — OpenTelemetry, Prometheus, Sentry, and structlog — into FastAPI, Litestar, and FastStream services in a few lines, with no boilerplate. 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: - LiteStar - FastStream - FastAPI - FastMCP - services and scripts without frameworks Lifecycle constraints A few constraints that aren't obvious from the API: - One bootstrapper per application instance. Constructing two FastAPIBootstrapper s around the same fastapi.FastAPI (or two FastMcpBootstrapper s around the same FastMCP ) stacks teardown hooks and re-wraps the lifespan. The library warns and skips the second attachment, but the second bootstrapper's teardown() won't fire on ASGI shutdown. - One OpenTelemetryInstrument per process. bootstrap() calls opentelemetry.trace.set tracer provider(...) , which the OTel SDK enforces as set-once — subsequent calls log a warning and have no effect. teardown() flushes spans and closes exporters but can't reset the process-global pointer. - teardown() is idempotent. BaseBootstrapper.teardown() short-circuits if not bootstrapped; per-instrument teardown methods are safe to call multiple times. - Partial teardown failures are aggregated. If an instr","default_branch":null,"files":null,"tree":[],"storefront":"/r/modern-python","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/modern-python/lite-bootstrap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}