Skip to main content

yb-observability

Reusable Python infrastructure for application configuration and observability.

yb-observability provides common infrastructure that can be shared across Python applications without coupling the library to a specific application or architecture.

The project currently focuses on configuration and logging, with additional observability capabilities planned for future releases.

Features

Configuration

  • YAML configuration loading.
  • Environment variable resolution.
  • Nested environment variable support.
  • Configuration validation.
  • Clear configuration-related exceptions.

Logging

  • Loguru-based logging.
  • Explicit application/service identity.
  • Consistent human-readable log format.
  • Console logging.
  • File logging.
  • Daily log rotation.
  • Configurable retention.
  • Per-service log directories.

Future

The library is designed to grow with additional infrastructure such as:

  • Structured/JSON logging.
  • Request and correlation IDs.
  • Metrics.
  • Distributed tracing.
  • OpenTelemetry integrations.
  • Additional observability integrations.

Features are introduced incrementally and remain independent where possible.

Installation

Install the package from PyPI:

pip install yb-observability

With uv:

uv add yb-observability

Basic Usage

Configuration:

from yb_observability.config import ConfigLoader

config = ConfigLoader("config.yml").load()

Logging:

from yb_observability.logging import configure_logging

configure_logging(service="my-service")

The application remains responsible for deciding what should be logged. yb-observability is responsible for configuring the logging infrastructure and providing a consistent logging interface.

Design Goals

Reusable

The library must not depend on a specific application, framework, infrastructure provider, or domain.

Explicit

Applications should explicitly configure the behavior they require rather than relying on hidden conventions.

Consistent

Applications using the library should receive consistent configuration and logging behavior.

Extensible

New capabilities should be possible without breaking the existing public API.

Testable

Core functionality should be covered by automated tests.

Production-oriented

The library should be suitable for both local development and production applications.

Project Structure

yb-observability/
├── src/
│   └── yb_observability/
│       ├── config/
│       └── logging/
│
├── tests/
│   ├── config/
│   └── logging/
│
├── .github/
│   ├── ISSUE_TEMPLATE/
│   └── workflows/
│
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── SECURITY.md
└── pyproject.toml

Development

The project uses:

  • Python 3.14
  • uv
  • Ruff
  • Pyright
  • Pytest
  • Loguru
  • PyYAML

Install development dependencies:

uv sync

Run the test suite:

uv run pytest

Run linting:

uv run ruff check .

Check formatting:

uv run ruff format --check .

Run type checking:

uv run pyright

Build the package:

uv build

Contributing

Contributions are welcome.

Before submitting a pull request, make sure that:

  • Tests pass.
  • Ruff checks pass.
  • Formatting checks pass.
  • Pyright checks pass.
  • The package builds successfully.
  • New functionality includes appropriate tests.
  • Public API changes are documented.

See CONTRIBUTING.md for development and contribution guidelines.

License

This project is licensed under the terms defined in LICENSE.

Release files for yb-observability 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yb-observability 0.2.0
File Size Uploaded
yb_observability-0.2.0.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yb-observability 0.2.0
File Interpreter ABI Platform
yb_observability-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / yb_observability-0.2.0.tar.gz

Download URL yb_observability-0.2.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
69cf0f3fba1463aff2355a1516fd43183ef87a441d51c6e614cf3c30c6aa903c
BLAKE2b-256 checksum
How to use checksums
d5d493d499acb0247f1dc4f83e0eca222d22f4bbbb2bc7dfad6cb0c6001e863d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / yb_observability-0.2.0-py3-none-any.whl

Download URL yb_observability-0.2.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce0ff7c1edd92f36d2276b8e75b1f325f2543cbb2cc609eb6251c93a95ab5432
BLAKE2b-256 checksum
How to use checksums
1ddb553603cd40cec7fde529206fa16b65c5ae8119c825071b41b940e2fc833d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page