yprint
yprint prefixes stdout/stderr lines with a colored call stack breadcrumb. It does this by preloading a small C shim that intercepts writes and lets the Python runtime update a per-thread prefix.
Install
pip install yprint
Usage
yprint -- python your_script.py
yprint -- bash -c 'python your_script.py'
Options
--only PATH(repeatable): Only show frames under the given path(s).--prefix-width N: Fixed width for the prefix column.
Environment
YPRINT_ONLY: Colon-separated list of allowed paths (same as--only).YPRINT_PREFIX_WIDTH: Fixed width for the prefix column.YPRINT_COLOR:alwaysorneverto force color on/off.YPRINT_CACHE_DIR: Override where the preload library is compiled.YPRINT_ENABLE: Set to1to auto-enable viasitecustomize.
yprint compiles the preload library on first run; a C compiler (cc) must be available.
Dev / Release
pip install -e ".[dev]"
python -m build
python -m twine upload dist/*
Metadata
Release files for yprint 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yprint-0.1.1.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yprint-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.1 kB
Release files / yprint-0.1.1.tar.gz
| Download URL | yprint-0.1.1.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b790514588c3dc19b6a365966cd006a2191e001f93e6a291fa50b0ced77648fc
|
|
BLAKE2b-256 checksum How to use checksums |
88e8a81a5a0c2a7a806a701ef65c016515a71c70d2c64c0523ae87830999067e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency logRelease files / yprint-0.1.1-py3-none-any.whl
| Download URL | yprint-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd3d4395126c82823ab5fb5877f19e37d0460a0fd7a18696bb952e55fc1db02b
|
|
BLAKE2b-256 checksum How to use checksums |
328e40ea86889b240f75ae44adff523d224a12f1670cdd29741be9814e5398d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.
Transparency log