Python SDK for publishing records to DevLogBus.
Project description
DevLogBus Python SDK
Standard-library Python SDK for publishing records to the DevLogBus HTTP API.
python3 -m pip install /path/to/DevLogBus/sdk/python
from devlogbus import DevLogBusClient, redact_attrs
devlog = DevLogBusClient(
source="checkout_worker",
redactor=redact_attrs(["authorization", "token"]),
)
devlog.publish(
level="INFO",
message="checkout started",
attrs={"request_id": "req-1"},
)
The default endpoint is http://127.0.0.1:7423. Pass endpoint explicitly for
other local or trusted-network daemons.
Use the logging handler when you want normal logging records to publish:
import logging
from devlogbus import DevLogBusLoggingHandler
logger = logging.getLogger("checkout")
logger.addHandler(DevLogBusLoggingHandler(source="checkout_worker"))
logger.warning("payment provider slow")
Run tests from the repository root:
python3 -m unittest discover -s sdk/python/tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devlogbus-1.3.1.tar.gz.
File metadata
- Download URL: devlogbus-1.3.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7a14aa029ec34b17d3e61e0902024aed6cc8461941bf76e9b5be832cef83344
|
|
| MD5 |
50053bcc2f77882db2608fa7888e89ea
|
|
| BLAKE2b-256 |
3dbae0f56db30deacd1a821114400e6a79b2305d835e84fe8ac6d8f261ffb586
|
File details
Details for the file devlogbus-1.3.1-py3-none-any.whl.
File metadata
- Download URL: devlogbus-1.3.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c90e6b0fc83a8e050b1572c7e11430240ec3f11ae632349aea2815ee4030799e
|
|
| MD5 |
099c4aad78983bbc0afcb1a4b70a3a10
|
|
| BLAKE2b-256 |
ecfb623829b528da98819f2b86ed3b346e3e35ecdcdccc71341b2f806bbde6dc
|