PyRePrint
Enhanced print() with decorators, formatting, and style patterns.
Installation
pip install pyreprint
Quick Start
from pyreprint import reprint
# Standard print behavior
reprint("Hello, World!")
# With decorators
reprint("Section Title", before="=", after="=", width=40)
# ========================================
# Section Title
# ========================================
# Using styles
reprint("Important!", style="banner", width=40)
# ****************************************
# * Important! *
# ****************************************
Decorator Functions
from pyreprint import line, header, box, banner
print(line("=", 40)) # ========================================
print(header("Title")) # Title\n=====
print(box("Content")) # +-------+\n| Content |\n+-------+
print(banner("WELCOME", width=40))
Built-in Styles
from pyreprint import reprint
reprint("Text", style="section") # Lines above and below
reprint("Text", style="header") # Underlined
reprint("Text", style="box") # In a box
reprint("Text", style="banner") # Centered banner
reprint("Text", style="success") # [OK] Text
reprint("Text", style="warning") # !! WARNING !! Text
reprint("Text", style="error") # [ERROR] Text
Custom Styles
from pyreprint import register_style, reprint
@register_style("custom")
def custom_style(text, **kwargs):
return f">>> {text} <<<"
reprint("Hello", style="custom") # >>> Hello <<<
Output Capture
from pyreprint import capture_output
with capture_output() as captured:
print("This is captured")
print(captured.stdout) # "This is captured\n"
Rich Integration
from pyreprint import rprint, panel, rule
rprint("[bold red]Error:[/bold red] Something went wrong")
rule("Section")
panel("Important", title="Notice")
Sklearn-style Repr
from pyreprint import ReprMixin
class MyModel(ReprMixin):
def __init__(self, alpha=1.0, max_iter=100):
self.alpha = alpha
self.max_iter = max_iter
model = MyModel(alpha=0.5)
print(model) # MyModel(alpha=0.5, max_iter=100)
Documentation
Full documentation: https://colinconwell.github.io/PyRePrint
License
GPL-3.0-or-later
Metadata
Release files for pyreprint 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 |
|---|---|---|---|---|
| pyreprint-0.1.0.tar.gz | 52.8 kB | Without provenance | Details for pyreprint-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreprint-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyreprint-0.1.0-py3-none-any.whl |
Total release size: 91.7 kB
Release files / pyreprint-0.1.0.tar.gz
| Download URL | pyreprint-0.1.0.tar.gz |
|---|---|
| Size | 52.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3db565726d3938a26469029771aba1047ce85c177cd6d9e6155b2d0f7df04f1
|
|
BLAKE2b-256 checksum How to use checksums |
4f7b7446e226a86e0d6821d6c0de3d70966a30a792b0ed514b38648244418bdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / pyreprint-0.1.0-py3-none-any.whl
| Download URL | pyreprint-0.1.0-py3-none-any.whl |
|---|---|
| Size | 38.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f616e97767a64822e20bc34b419203e59ae3242b2d2e5123e2e28ffb1433e637
|
|
BLAKE2b-256 checksum How to use checksums |
b8c5a583b296133e12c25addba8e93b6c93cb48b1e81789758a962e40e4866bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for pyreprint 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.