birling
birling measures log coverage in Python projects: how well the code is covered by log calls, whether through the standard logging module, structlog, loguru or a project's own helpers, the way coverage.py measures how well it is covered by tests.
A handled exception that leaves no log is a failure nobody hears about. birling finds the places in the code where something should be logged, checks whether a log call is there, and gives the project a score that a CI run can hold to a minimum. By default, those places are except handlers that do not raise again.
$ birling shop
Name Branches Logged Score Unlogged
---------------------------------------------------
shop/orders.py 2 1 50% 12
shop/payments.py 2 1 50% 12
---------------------------------------------------
TOTAL 4 2 50%
Installation
birling needs Python 3.11 or later and has no dependencies of its own. Install it from PyPI:
pip install birling
The coverage extra, birling[coverage], adds coverage.py, which the command needs to mark the unlogged branches that ran in the tests.
Usage
birling PATH... [--config FILE] [--fail-under SCORE] [--coverage-file FILE] [--show-unlogged]
The command reads its configuration from the [tool.birling] table of pyproject.toml, and exits with status 1 when the score is below the minimum:
[tool.birling]
fail-under = 80
The standard logging module needs no configuration; other logging libraries and a project's own logging helpers are described in the table.
Documentation
The documentation covers the command, the configuration, how branches and log calls are found, and the Python interface. It is in docs/; just docs serves it locally.
The name
Log rolling, sometimes called birling, is a sparring sport involving two competitors, each standing on one end of a free-floating log in a body of water. The two battle to dislodge each other from the log while keeping their own footing on it by spinning and kicking it and various other means.
— Wikipedia, Logrolling (sport)
The lumberjacks' sport lends its name to a tool for keeping on top of a project's logs.
Status
birling is experimental: its interface may change before the first release.
Metadata
Release files for birling 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| birling-0.1.0.tar.gz | 120.2 kB | Without provenance | Details for birling-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| birling-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for birling-0.1.0-py3-none-any.whl |
Total release size: 142.6 kB
Release files / birling-0.1.0.tar.gz
| Download URL | birling-0.1.0.tar.gz |
|---|---|
| Size | 120.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28c294fadace967898bfa446dec4c823d89d6b4e2dd4e910741062235e15c346
|
|
BLAKE2b-256 checksum How to use checksums |
f4c85d9ba7dadb0611eec2870177c4516abf4aeb8daa3d7443de8a686d5de9cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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 / birling-0.1.0-py3-none-any.whl
| Download URL | birling-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8c358a4c34a8e7b9cad3c84c18d76f0af9c9669f134da4c4a9709d92a3ec3e5
|
|
BLAKE2b-256 checksum How to use checksums |
aa9b274d80042c4bedcc02b652cec32781ef25a9c5a861a0daa3a01103ec8304
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}
|
Security for birling 0.1.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.