Skip to main content

python-trace-compact

A zero-dependency high-density CLI compactor that compresses raw Python lines execution logs into readable structural matrices and chronological sequences.

Installation

Install the package directly from your local development repository or download wheel artifacts:

pip install .

For live active development tracking, link the source paths using editable mode:

pip install -e .

Usage

Pip pipelines register a universal entry point executable named trace-compact into your system binary environment paths.

1. High-Level Summary Matrix (--summary)

Aggregates overall module statistics sorted chronologically by the earliest trace step execution window entry point.

python3 -m trace --trace script.py | trace-compact --summary

Output Layout:

# fields: earliest and latest trace step seen, filepath, first and last line numbers, average calls (calls / distinct lines)
0007563-0027062 _base.py                         line 4-642, avg hits 1.1
0027063-0027110 units.py                         line 12-85, avg hits 1.0

To dynamically inject metrics back into the default view, supply comma-separated parameters via the --fields argument:

python3 -m trace --trace script.py | trace-compact --summary --fields count,distinct

2. Unique Execution Tallies (--detailed-summary)

Produces an alphabetically sorted filename summary displaying explicit total execution counts mapped to individual code lines.

python3 -m trace --trace script.py | trace-compact --detailed-summary

Output Layout:

# fields: filepath, line number✖calls|...
base.py|842✖️5|848✖️6|
typing.py|273✖️6|274✖️6|

3. Chronological Sequence Layout (Default Stream)

Collapses matching sequential executions within a file onto a single continuous line, using ellipsis truncation strings (…) to absorb repetitive loop structures.

python3 -m trace --trace script.py | trace-compact

Output Layout:

# fields: filepath, line numbers
enum.py:383:384:674:680:681:…:680:681:683:690

Options & Arguments

To see the complete automated user configuration handbook directly inside your terminal, execute:

trace-compact --help
  • --src <DIR>: Verifies trace log executions against valid Python files inside a targeted source tree root. Disambiguates duplicate file basenames, converts outputs to relative source paths, and rejects trace entries outside line count bounds.
  • --skip-libs: Automatically filters standard library internals, hidden wrappers, and site-packages dependencies out of output data logs to isolate your primary project application files.
  • -o, --output: Instructs the processing core to dump compiled summaries into a persistent storage file instead of piping directly to stdout.

License

Metadata

Release files for python-trace-compact 0.3.3

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

Source distribution (sdist)

Source distribution for python-trace-compact 0.3.3
File Size Uploaded Provenance
python_trace_compact-0.3.3.tar.gz 7.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-trace-compact 0.3.3
File Interpreter ABI Platform
python_trace_compact-0.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / python_trace_compact-0.3.3.tar.gz

Download URL python_trace_compact-0.3.3.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
27993d86c567dcd6168ecd8fcc7b393ac2a9593b0fcace0f44be76a0de2ea6bc
BLAKE2b-256 checksum
How to use checksums
494495afdac7acb45740fba248992414729ab78086b7d9c80d6808d8ec767ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Release files / python_trace_compact-0.3.3-py3-none-any.whl

Download URL python_trace_compact-0.3.3-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f86ad8f6154abb2e72c1b4ceb471dea3df5f586014b2fa617841a7d54df78e0
BLAKE2b-256 checksum
How to use checksums
2d384c68f2b51902a120775f11fdeebf264b364124d9252bd983c9df29348d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.13

Security for python-trace-compact 0.3.3

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.

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