lite-bootstrap 1.2.1__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/PKG-INFO +10 -4
  2. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/README.md +9 -3
  3. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/litestar_bootstrapper.py +8 -1
  4. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/pyproject.toml +1 -1
  5. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/__init__.py +0 -0
  6. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/__init__.py +0 -0
  7. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/base.py +0 -0
  8. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/fastapi_bootstrapper.py +0 -0
  9. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/fastmcp_bootstrapper.py +0 -0
  10. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/faststream_bootstrapper.py +0 -0
  11. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/bootstrappers/free_bootstrapper.py +0 -0
  12. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/exceptions.py +0 -0
  13. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/helpers/__init__.py +0 -0
  14. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/helpers/fastapi_helpers.py +0 -0
  15. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/helpers/path.py +0 -0
  16. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/import_checker.py +0 -0
  17. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/__init__.py +0 -0
  18. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/base.py +0 -0
  19. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/cors_instrument.py +0 -0
  20. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/healthchecks_instrument.py +0 -0
  21. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/logging_factory.py +0 -0
  22. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/logging_instrument.py +0 -0
  23. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/opentelemetry_instrument.py +0 -0
  24. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/prometheus_instrument.py +0 -0
  25. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/pyroscope_instrument.py +0 -0
  26. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/sentry_instrument.py +0 -0
  27. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/instruments/swagger_instrument.py +0 -0
  28. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/py.typed +0 -0
  29. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/fastapi_docs/redoc.standalone.js +0 -0
  30. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/fastapi_docs/swagger-ui-bundle.js +0 -0
  31. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/fastapi_docs/swagger-ui.css +0 -0
  32. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/litestar_docs/asyncapi-web-component.js +0 -0
  33. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/litestar_docs/default.min.css +0 -0
  34. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/litestar_docs/swagger-ui-bundle.js +0 -0
  35. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/litestar_docs/swagger-ui-standalone-preset.js +0 -0
  36. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/static/litestar_docs/swagger-ui.css +0 -0
  37. {lite_bootstrap-1.2.1 → lite_bootstrap-1.2.2}/lite_bootstrap/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lite-bootstrap
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Lightweight bootstrap for production-ready Python microservices
5
5
  Keywords: microservices,bootstrap,opentelemetry,sentry,error-tracing,fastapi,litestar,faststream,structlog,fastmcp,python
6
6
  Author: Artur Shiriev
@@ -86,11 +86,17 @@ Provides-Extra: pyroscope
86
86
  Provides-Extra: sentry
87
87
  Description-Content-Type: text/markdown
88
88
 
89
- # lite-bootstrap
89
+ <p align="center">
90
+ <picture>
91
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/modern-python/.github/main/brand/projects/lite-bootstrap/lockup-dark.svg">
92
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/modern-python/.github/main/brand/projects/lite-bootstrap/lockup-light.svg">
93
+ <img alt="lite-bootstrap" src="https://raw.githubusercontent.com/modern-python/.github/main/brand/projects/lite-bootstrap/lockup.png" width="420">
94
+ </picture>
95
+ </p>
90
96
 
91
97
  [![PyPI version](https://img.shields.io/pypi/v/lite-bootstrap.svg)](https://pypi.org/project/lite-bootstrap/)
92
98
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/lite-bootstrap.svg)](https://pypi.org/project/lite-bootstrap/)
93
- [![Downloads](https://img.shields.io/pypi/dm/lite-bootstrap.svg)](https://pypistats.org/packages/lite-bootstrap)
99
+ [![Downloads](https://static.pepy.tech/badge/lite-bootstrap/month)](https://pepy.tech/projects/lite-bootstrap)
94
100
  [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](https://github.com/modern-python/lite-bootstrap/actions/workflows/ci.yml)
95
101
  [![CI](https://github.com/modern-python/lite-bootstrap/actions/workflows/ci.yml/badge.svg)](https://github.com/modern-python/lite-bootstrap/actions/workflows/ci.yml)
96
102
  [![License](https://img.shields.io/github/license/modern-python/lite-bootstrap.svg)](https://github.com/modern-python/lite-bootstrap/blob/main/LICENSE)
@@ -100,7 +106,7 @@ Description-Content-Type: text/markdown
100
106
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
101
107
  [![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
102
108
 
103
- `lite-bootstrap` helps you bootstrap production-ready Python microservices with all the necessary instruments already set up.
109
+ `lite-bootstrap` wires production observability — OpenTelemetry, Prometheus, Sentry, and structlog — into FastAPI, Litestar, and FastStream services in a few lines, with no boilerplate.
104
110
 
105
111
  With `lite-bootstrap`, you receive an application with lightweight built-in support for:
106
112
  - `sentry`
@@ -1,8 +1,14 @@
1
- # lite-bootstrap
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/modern-python/.github/main/brand/projects/lite-bootstrap/lockup-dark.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/modern-python/.github/main/brand/projects/lite-bootstrap/lockup-light.svg">
5
+ <img alt="lite-bootstrap" src="https://raw.githubusercontent.com/modern-python/.github/main/brand/projects/lite-bootstrap/lockup.png" width="420">
6
+ </picture>
7
+ </p>
2
8
 
3
9
  [![PyPI version](https://img.shields.io/pypi/v/lite-bootstrap.svg)](https://pypi.org/project/lite-bootstrap/)
4
10
  [![Supported Python versions](https://img.shields.io/pypi/pyversions/lite-bootstrap.svg)](https://pypi.org/project/lite-bootstrap/)
5
- [![Downloads](https://img.shields.io/pypi/dm/lite-bootstrap.svg)](https://pypistats.org/packages/lite-bootstrap)
11
+ [![Downloads](https://static.pepy.tech/badge/lite-bootstrap/month)](https://pepy.tech/projects/lite-bootstrap)
6
12
  [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen.svg)](https://github.com/modern-python/lite-bootstrap/actions/workflows/ci.yml)
7
13
  [![CI](https://github.com/modern-python/lite-bootstrap/actions/workflows/ci.yml/badge.svg)](https://github.com/modern-python/lite-bootstrap/actions/workflows/ci.yml)
8
14
  [![License](https://img.shields.io/github/license/modern-python/lite-bootstrap.svg)](https://github.com/modern-python/lite-bootstrap/blob/main/LICENSE)
@@ -12,7 +18,7 @@
12
18
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
13
19
  [![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
14
20
 
15
- `lite-bootstrap` helps you bootstrap production-ready Python microservices with all the necessary instruments already set up.
21
+ `lite-bootstrap` wires production observability — OpenTelemetry, Prometheus, Sentry, and structlog — into FastAPI, Litestar, and FastStream services in a few lines, with no boilerplate.
16
22
 
17
23
  With `lite-bootstrap`, you receive an application with lightweight built-in support for:
18
24
  - `sentry`
@@ -118,6 +118,8 @@ class LitestarConfig(
118
118
  ):
119
119
  application_config: "AppConfig" = dataclasses.field(default_factory=lambda: AppConfig()) # noqa: PLW0108
120
120
  prometheus_additional_params: dict[str, typing.Any] = dataclasses.field(default_factory=dict)
121
+ # Bounds path-label cardinality (Litestar defaults False -> raw URLs leak memory). See litestar#4891.
122
+ prometheus_group_path: bool = True
121
123
  swagger_extra_params: dict[str, typing.Any] = dataclasses.field(default_factory=dict)
122
124
 
123
125
 
@@ -209,9 +211,14 @@ class LitestarPrometheusInstrument(PrometheusInstrument):
209
211
  include_in_schema = self.bootstrap_config.prometheus_metrics_include_in_schema
210
212
  openmetrics_format = True
211
213
 
214
+ # Merged so prometheus_additional_params can override group_path without a kwarg collision.
215
+ prometheus_params: dict[str, typing.Any] = {
216
+ "group_path": self.bootstrap_config.prometheus_group_path,
217
+ **self.bootstrap_config.prometheus_additional_params,
218
+ }
212
219
  litestar_prometheus_config = PrometheusConfig(
213
220
  app_name=self.bootstrap_config.service_name,
214
- **self.bootstrap_config.prometheus_additional_params,
221
+ **prometheus_params,
215
222
  )
216
223
 
217
224
  self.bootstrap_config.application_config.route_handlers.append(LitestarPrometheusController)
@@ -19,7 +19,7 @@ classifiers = [
19
19
  "Typing :: Typed",
20
20
  "Topic :: Software Development :: Libraries",
21
21
  ]
22
- version = "1.2.1"
22
+ version = "1.2.2"
23
23
  dependencies = [
24
24
  "orjson",
25
25
  ]