Skip to main content

Common utilities for MVX Python packages.

Project description

MVX Common

common-ci

mvx-common is a Python package with foundation-level infrastructure for MVX Python projects.

Its main public component is MVX Logger.

MVX Logger is a lightweight structured event logging infrastructure for applications and reusable Python libraries that need rich and flexible diagnostic visibility.

Most logging tools focus on formatting, routing, or collecting log records. MVX Logger focuses on the step before that: how code creates structured diagnostic events, controls their diagnostic data, and hands them over for delivery.

Key features

  • log structured events with rich, flexible, and structured diagnostic info instead of hand-written log strings
  • control logging width through event policies without changing calling code, focusing logs on current diagnostic needs
  • keep event diagnostic data well-shaped and clean through centralized payload normalization
  • change logging destination and formatting without changing event-producing code
  • deliver events to standard logging streams, files, async sinks, or custom backends
  • keep the logging path fast and thread-safe while slow backends are handled outside the business flow
  • log standardized business operation lifecycles without writing logging code inside the operation body
  • capture selected call arguments, results, errors, and context fields as structured event diagnostic info
  • keep business logic focused on the operation itself instead of repetitive try/except logging blocks
  • start using it almost as simply as regular logging, then move to deeper structured diagnostics when needed

What MVX Logger is not

MVX Logger is not a replacement for logging, structlog, loguru, or OpenTelemetry.

It is a structured event creation layer that can sit before those tools or other delivery backends.

The goal is not to own the whole observability stack. The goal is to make diagnostic event creation explicit, structured, configurable, and safe to use across project boundaries.

Other utilities

mvx-common also includes smaller foundation utilities used by MVX packages:

structured errors
public API error normalization helpers
asyncio cancellation helpers

These utilities support predictable public errors, explicit cancellation behavior, and consistent diagnostics.

Requirements

mvx-common requires Python 3.11 or newer.

Python >= 3.11

Installation for development

From the package directory:

cd common
python -m pip install -e ".[dev]"

To install documentation dependencies as well:

python -m pip install -e ".[dev,docs]"

Running checks

From the package directory:

scripts/check.sh

The check script runs:

black --check
ruff check
mypy
pytest with branch coverage

The package requires at least 90% branch coverage.

Documentation

Full documentation:

https://mvx-lib.readthedocs.io/en/latest/

MVX Logger overview:

https://mvx-lib.readthedocs.io/en/latest/common/logger/overview.html

Getting started:

https://mvx-lib.readthedocs.io/en/latest/common/logger/getting_started/

Advanced usage:

https://mvx-lib.readthedocs.io/en/latest/common/logger/advanced_usage/

log_invocation guide:

https://mvx-lib.readthedocs.io/en/latest/common/logger/log_components/log_invocation/overview.html

Version history:

https://mvx-lib.readthedocs.io/en/latest/common/version_history/

Building documentation

From the repository root:

scripts/docs.sh

The built HTML documentation is written to:

docs/_build/html/

Project status

This is an early public project.

The implementation reflects the needs of the project at this stage. The code is covered with tests, CI checks, and documentation that describes both ordinary usage and extension points.

Feedback, bug reports, documentation corrections, and practical feature requests are welcome.

Contributing

Repository-level contribution rules are documented in:

../CONTRIBUTING.md

License

mvx-common is licensed under the Apache License, Version 2.0.

See:

LICENSE
NOTICE

Author

Vladimir Makarov

Contact:

makarovvv.dream@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mvx_common-0.2.1.tar.gz (101.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mvx_common-0.2.1-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

Details for the file mvx_common-0.2.1.tar.gz.

File metadata

  • Download URL: mvx_common-0.2.1.tar.gz
  • Upload date:
  • Size: 101.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mvx_common-0.2.1.tar.gz
Algorithm Hash digest
SHA256 eb18bc2a58a868437df2f9c29a874d9de9a245da9fec01ff4307842daa969530
MD5 cfcea99a119910dd2bc8286f0827ceea
BLAKE2b-256 8e6ea456f7cfe3cb308d3881133c39fd40683e3a9e850b3d730e1f002b7eba3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvx_common-0.2.1.tar.gz:

Publisher: publish-common-pypi.yml on makarovvvdream-dev/mvx-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mvx_common-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: mvx_common-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 61.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mvx_common-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0e377a6a5777738ef9449582e620d4e587f55d8e4852831799dc3fb63f32f4a1
MD5 1f54433ae373d1b9a59a644aab8a22fd
BLAKE2b-256 cfc02677459dba9fc325802f0699fb425b260478fa40edaa838178029f7323fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvx_common-0.2.1-py3-none-any.whl:

Publisher: publish-common-pypi.yml on makarovvvdream-dev/mvx-lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page