python-printr
printr
What it is and what it does
python-printr is a small utility library that wraps Python's print function to add formatting and logging capabilities. It provides a `print()` function that automatically indents and formats nested dictionaries and lists for readability, a `same_line()` function that overwrites the previous line (useful for progress indicators), and a `logger()` class that writes messages to both the terminal and a specified log file. The package has no external runtime dependencies, making it lightweight to install, though the build artifact shows high install friction that may indicate a packaging or build-time issue.
The library is designed for developers who want cleaner, more readable output in scripts and applications without the overhead of a full logging framework. It is actively maintained, with the latest release on 2026-04-15. The license status is unclear, which is a consideration for production use.
Use it for:
- Pretty-print complex nested JSON or dictionary structures during debugging or data inspection.
- Log application messages to both console and file simultaneously without configuring Python's logging module.
- Display progress updates on the same terminal line with timestamps, overwriting previous output.
- Format and beautify output in CLI tools or scripts where readability matters but full logging infrastructure is overkill.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides enhanced print functions that format and beautify terminal output, including pretty-printing nested data structures and logging messages to both console and file.
Yes, with conditions. The package solves a real problem—making terminal output more readable—and has no external dependencies, so it's low-risk to try. However, the unclear license status requires verification before use in commercial or restricted-distribution projects, and the high install friction warrants checking whether it resolves cleanly in your environment. Minimal repository engagement suggests limited ecosystem integration or third-party support.
Install
python-printr on PyPI
pip
pip install python-printruv
uv add python-printrpoetry
poetry add python-printrInstalling python-printr
Before you install
High install friction reported; package has no runtime dependencies but shows friction signals in the build artifact. Active maintenance as of 2026-04-15 with recent commits, though repository has minimal engagement (1 star).
License in practice
License status is unclear—no SPDX identifier or raw license text is available. Users should verify licensing terms before adopting in commercial or restricted-distribution contexts.
Quickstart
pip install python-printr
from printr import logger, print, same_line
logger_instance = logger(filename='test.log')
log = logger_instance.log
log('Here') # Prints to terminal and saves to test.log
print({'key': 'value'}) # Pretty-prints nested structures
same_line('message', current_time=True) # Prints with timestamp
Verify before relying
- Python version compatibility and minimum required version are unspecified.
- Whether 'high' install friction stems from a compiled dependency, network issue, or packaging problem.
- Full feature set and API surface beyond the documented examples in the description excerpt.
- Community adoption level and ecosystem integration beyond the repository star count.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | actively maintained — 121 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 144,312/month — #11,156 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_printr-2026.4.15.tar.gz
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
prettyprinterSyntax-highlighted, declarative pretty printer…
permissive · top 5,000 on PyPI
colorclassProvides ANSI color text output for console…
permissive · top 5,000 on PyPI
wadler-lindigFormats Python objects for readable output…
permissive · top 5,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
simple-colorsAdds colored and styled text output to terminal…
unclear · top 15,000 on PyPI
termcolorAdds ANSI color and text formatting (bold,…
permissive · top 1,000 on PyPI
pastelPastel adds colored text output to terminal…
permissive · top 5,000 on PyPI
log-symbolsProvides colored Unicode symbols (✔, ℹ, ⚠, ✖)…
permissive · top 5,000 on PyPI
beautifultablePrints tabular data to the terminal in a…
permissive · top 15,000 on PyPI
crayonsCrayons provides colored text output for…
permissive · top 15,000 on PyPI