Skip to main content

Support Ukraine Badge

log-indented

Python Package

This package helps you and your code produce indented, human-friendly, easy to understand logs.

Executing count_barnyard_animals() in this code example:

from log_indented import logged, log_info

@logged(logger)
def count_chicken() -> int:
    return 3


@logged(logger)
def count_ducks() -> int:
    return 7


@logged(logger)
def count_birds() -> int:
    return count_chicken() + count_ducks()


@logged(logger)
def count_goats() -> int:
    return 7


@logged(logger)
def count_sheep() -> int:
    return 0


@logged(logger)
def count_barnyard_animals() -> int:
    total_animal_count: int = count_birds() + count_goats() + count_sheep()
    log_info(f"total barnyard animals: {total_animal_count}")
    return total_animal_count

will produce output similar to this:

    + count_barnyard_animals: enter
        + count_birds: enter
            + count_chicken: enter
            - count_chicken: exit. took 0.00 ms.
            + count_ducks: enter
            - count_ducks: exit. took 0.00 ms.
        - count_birds: exit. took 0.07 ms.
        + count_goats: enter
        - count_goats: exit. took 0.00 ms.
        + count_sheep: enter
        - count_sheep: exit. took 0.00 ms.
      count_barnyard_animals: total barnyard animals: 17
    - count_barnyard_animals: exit. took 0.18 ms.

Metadata

Release files for log-indented 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for log-indented 0.4.5
File Size Uploaded Provenance Actions
log_indented-0.4.5.tar.gz 6.1 kB Without provenance Details for log_indented-0.4.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for log-indented 0.4.5
File Interpreter ABI Platform Actions
log_indented-0.4.5-py3-none-any.whl Python 3 none any Details for log_indented-0.4.5-py3-none-any.whl

Total release size: 12.2 kB

Release files / log_indented-0.4.5.tar.gz

Download URL log_indented-0.4.5.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a8811c9b7901dba1bf52b583acea5320eb94dc7ded5a11cf6c1b30dd525ec173
BLAKE2b-256 checksum
How to use checksums
fca3dc7c3a0bebf11f70d3495cc65f997ae27536b25341175245f129c85ca1be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / log_indented-0.4.5-py3-none-any.whl

Download URL log_indented-0.4.5-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0741f2a5e25f6ad2d98005bd2fdb08696b75ab17ce48219ea911c16224ceea2
BLAKE2b-256 checksum
How to use checksums
0fb1a8bfc0ebcbbe16f936ad6e2fdfdd3a033f4ad5ce18bc0517fe102efb5978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for log-indented 0.4.5

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.

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