Skip to main content

sb-loki-handler

Typed loki handler for logging

Installation

You can install the package via pip:

pip install sb-loki-handler

Usage

import logging

from sb_loki_handler import LokiHandler

logger = logging.getLogger("my-logger")
logger.setLevel(logging.INFO)

handler = LokiHandler(
    "https://user:pass@host/loki/api/v1/push",
    labels={"application": "my-app"}
)
logger.addHandler(handler)


logger.info("Hello world.")
logger.info("With extra", extra={"labels": {"foo": "bar"}})

with handler.labels({"foo": "bar"}):
    logger.info("With context")

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for sb-loki-handler 1.0.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 sb-loki-handler 1.0.0
File Size Uploaded Provenance
sb_loki_handler-1.0.0.tar.gz 3.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sb-loki-handler 1.0.0
File Interpreter ABI Platform
sb_loki_handler-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / sb_loki_handler-1.0.0.tar.gz

Download URL sb_loki_handler-1.0.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9ec7248dd1f5737fa44373611de822572edcd32c2d28a27d6b3bd34eaf8fb51e
BLAKE2b-256 checksum
How to use checksums
bec41aa9607030a9e22bcdcc08b1a6d9424d344499dd3368524b0161310d47fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.24

Release files / sb_loki_handler-1.0.0-py3-none-any.whl

Download URL sb_loki_handler-1.0.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d83d79ed3c16f013df666c800c72b1f4e3ae2678865c5c0a42a4378dd017f7c
BLAKE2b-256 checksum
How to use checksums
2a264cb26eb1b53cfcece2b5f651816c28200ddf6a7f7f6664a72030f7cb25cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.24

Security for sb-loki-handler 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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