Skip to main content

Reusable Python Utilities by McCool

Project description

codecov docs PyPI - Version GitHub version

Installation

  • pip install pymccool

Usage

  • For basic, no-nonsense console and file logging:

    from pymccool.logging import Logger
    logger = Logger(app_name="<your app name>")
    
  • For more options, use LoggerKwargs

    from pymccool.logging import Logger, LoggerKwargs
    logger = Logger(
            LoggerKwargs(
                app_name="test_logger_loki",
                default_level=Logger.VERBOSE,
                stream_level=Logger.VERBOSE,
                grafana_loki_endpoint="https://loki.end.point.com/loki/api/v1/push")
    )
    
  • To use the Tracer:

    from uuid import uuid1
    from pymccool.tracing import get_tracer, get_decorator
    from pymccool.logging import Logger, LoggerKwargs
    logger = Logger(
            LoggerKwargs(
                app_name="test_logger_loki",
                default_level=Logger.VERBOSE,
                stream_level=Logger.VERBOSE,
                grafana_loki_endpoint="https://loki.end.point.com/loki/api/v1/push")
    )
    tracer = get_tracer(service_name="test_tracer",
                        endpoint="https://otel-rec.end.point.com/v1/traces",
                        uuid=UUID)
    instrument_decorator = get_decorator(e2e_tracer)
    

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

pymccool-0.5.6.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

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

pymccool-0.5.6-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file pymccool-0.5.6.tar.gz.

File metadata

  • Download URL: pymccool-0.5.6.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pymccool-0.5.6.tar.gz
Algorithm Hash digest
SHA256 d8baeb39e7fd7d75b5597951f7501b1765a4f6f9d66f22ee9042a7165c21cc84
MD5 200a701f7a47f71000e56933b4eed00f
BLAKE2b-256 146527f75f407e5540cae0132ecf87c19e87c4aa8c2ce0f095c8a1a88ce0c011

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymccool-0.5.6.tar.gz:

Publisher: ci.yaml on bmccool/pyMcCool

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

File details

Details for the file pymccool-0.5.6-py3-none-any.whl.

File metadata

  • Download URL: pymccool-0.5.6-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pymccool-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c4f27b639d32bd104a5e14e65a20b809e34051b5663908ce8e1eaba2adb930e4
MD5 e48424ae02bd2c8b641b1850e64198a6
BLAKE2b-256 bac00e3743a0358fea3e3b64e37e22af437caad7efd83aba41b1a0c13d2bcb59

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymccool-0.5.6-py3-none-any.whl:

Publisher: ci.yaml on bmccool/pyMcCool

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