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.3.tar.gz (107.7 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.3-py3-none-any.whl (65.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mvx_common-0.2.3.tar.gz
  • Upload date:
  • Size: 107.7 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.3.tar.gz
Algorithm Hash digest
SHA256 90609bee1aecb452bf4917eab003ed4e734948166e10ae12d9529c2e050d76a0
MD5 5e3f7c57741ade83efdbda7f7bb20f86
BLAKE2b-256 a47a0321cfdf9aea022c6462598e9e485001ea449e2156798fbe006f105b7b2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvx_common-0.2.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: mvx_common-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 65.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d02a9cb72ec37391218c021d8f21f513e1b77ae1608518f8b7900962b4d61d
MD5 865e1567ed87856ad8f7db35015f24a5
BLAKE2b-256 c2dc8369d588a5e4f84f4c4108bd8406a626df0d7cd1e8fea0e78d720f3bfec6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvx_common-0.2.3-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