bievents
Business Intelligence events — structured JSON BI event logging on top of Python logging.
Installation
pip install git+https://github.com/entirius/entirius-py-bievents.git@v2.0.0
(PyPI release planned: pip install entirius-py-bievents.)
Example usage
Emitting a simple event:
import logging
from bievents import (
BiFormatter,
BI_LOGGER_NAME,
BiEventAbstract,
)
json_handler = logging.FileHandler(filename="example-json.log")
json_handler.setFormatter(BiFormatter())
logger = logging.getLogger(BI_LOGGER_NAME)
logger.addHandler(json_handler)
logger.setLevel(logging.DEBUG)
class SimpleEvent(BiEventAbstract):
details_type = "Simple Event test"
version = 2
SimpleEvent(
source="example source name",
business_unit="example business unit",
environment="example environment",
status="success",
)
The code above appends one JSON event to example-json.log:
{
"details_type": "Simple Event test",
"event_source": "example source name",
"business_unit": "example business unit",
"environment": "example environment",
"id": "199f75bb-260b-46e2-8c8d-3463b9981c92",
"version": "0.0.1",
"status": "success",
"resources": [
"xxxx"
],
"is_ongoing_event": false,
"time_start": "2022-05-13T12:29:35.705751+00:00",
"time_end": "2022-05-13T12:29:35.705751+00:00",
"time_duration": 0,
"details": {}
}
Development
make install # sync dependencies (uv)
make check # lint + format check (ruff)
make test # test suite (pytest)
Development and agent instructions: AGENTS.md.
License
Mozilla Public License 2.0 — see LICENSE.
Metadata
Release files for entirius-py-bievents 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| entirius_py_bievents-2.0.0.tar.gz | 27.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| entirius_py_bievents-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.1 kB
Release files / entirius_py_bievents-2.0.0.tar.gz
| Download URL | entirius_py_bievents-2.0.0.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec23373080ed3e3a90784b850ef15536946e44e379070a3dc0e427237fbe4903
|
|
BLAKE2b-256 checksum How to use checksums |
6716c5dbc75547b905262a7df7df14b18b79325586eed8b8b49a418c6612e8b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / entirius_py_bievents-2.0.0-py3-none-any.whl
| Download URL | entirius_py_bievents-2.0.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40b93a235638bccac10b63719696f798eaa1acd1f2b1d5212bf7c5952d426332
|
|
BLAKE2b-256 checksum How to use checksums |
cf4cca0d805a5710717d4465e01e8bf115d4de344a8454a997642f7fec0dae53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|