Skip to main content

Output Decorator v0.1.1

GitHub release (latest by date) PyPI - Downloads GitHub top language PyPI GitHub PyPI - Format


⚠️ Disclaimer

By using this software, you agree to the full disclaimer terms.

Summary: Software provided "AS IS" without warranty. You assume all risks.

Full legal disclaimer: See DISCLAIMER.md


📌 Overview

Output Decorator is a lightweight Python library designed to enhance CLI application output with professional text decoration. It automatically adapts to your terminal width and provides simple methods for creating visually appealing formatted output.


✨ Features

  • 🖥️ Terminal-aware – Automatically detects and uses your terminal width
  • 🎨 Flexible decoration – Customize border symbols for any style
  • 📝 Frame formatting – Create framed text blocks with different top/bottom borders
  • 🔧 Simple API – Clean, intuitive interface with minimal learning curve
  • ⚡ Lightweight – No external dependencies beyond Python standard library

📦 Installation

pip install outputdecorator

🚀 Quick Start

from output_decorator import StringDecorator

# Center text with automatic terminal width
StringDecorator.string_decorate(text='Python', symbol='*', print_flag=True)
# Output: ************************************ Python ***********************************

# Get decorated string without printing
decorated = StringDecorator.string_decorate(text='Python', symbol='*', print_flag=False)
print(decorated)  # Same output as above

# Create framed text with different border styles
frame = StringDecorator.framed_decorate(
    text='Python', 
    top_symbol='*', 
    bottom_symbol='-'
)
print(frame)
"""
******
Python
------
"""

📚 API Reference

StringDecorator.string_decorate(text='', symbol='*', print_flag=True)

Creates a centered line of text padded with the specified symbol to fill the terminal width.

Parameters:

  • text (str) – The text to decorate (default: empty string)
  • symbol (str) – Character used for padding (default: '*')
  • print_flag (bool) – If True, prints directly; if False, returns the string (default: True)

Returns: str or None – Decorated string if print_flag=False, otherwise None

StringDecorator.framed_decorate(text='', top_symbol='-', bottom_symbol='-')

Creates a framed text block with separate top and bottom borders.

Parameters:

  • text (str) – The text to frame (default: empty string)
  • top_symbol (str) – Character for the top border (default: '-')
  • bottom_symbol (str) – Character for the bottom border (default: '-')

Returns: str – Formatted string with top border, text, and bottom border

StringDecorator.term_width()

Returns the current terminal width in columns.

Returns: int – Terminal width


💡 Use Cases

  • CLI tools – Create visually distinct section headers
  • Logging – Highlight important log entries
  • Reports – Format console output for better readability
  • Installers/Setup scripts – Create professional-looking progress indicators
  • Development tools – Debug output with clear visual separation

🔍 Examples

Creating a banner

StringDecorator.string_decorate(text='WELCOME', symbol='=')
# =================================== WELCOME ====================================

Empty line separator

StringDecorator.string_decorate(symbol='-')
# --------------------------------------------------------------------------------

Different frame styles

# Warning box
print(StringDecorator.framed_decorate('⚠️  WARNING  ⚠️', top_symbol='!', bottom_symbol='!'))

# Success message
print(StringDecorator.framed_decorate('✓ Success!', top_symbol='=', bottom_symbol='='))

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.


📄 License

This project is licensed under the terms specified in the repository. See the LICENSE file for details.


📞 Support


Made with ❤️ for the Python CLI community

Metadata

Release files for outputdecorator 0.1.1

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

Source distribution (sdist)

Source distribution for outputdecorator 0.1.1
File Size Uploaded Provenance Actions
outputdecorator-0.1.1.tar.gz 4.4 kB Without provenance Details for outputdecorator-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for outputdecorator 0.1.1
File Interpreter ABI Platform Actions
outputdecorator-0.1.1-py3-none-any.whl Python 3 none any Details for outputdecorator-0.1.1-py3-none-any.whl

Total release size: 9.4 kB

Release files / outputdecorator-0.1.1.tar.gz

Download URL outputdecorator-0.1.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e394f2cbd608330e106db7b0f0e64dc6116e83f1587b9d94bbd9762693bc7a1b
BLAKE2b-256 checksum
How to use checksums
5d06c226a21b0d683edec7d3336f3d59f0bc29b2cfea67d1fd00830c82d6a502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / outputdecorator-0.1.1-py3-none-any.whl

Download URL outputdecorator-0.1.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d8382b1a1d5ed6f6f0956a3fdabb27e0cce8df76e23285687bea340398c8c8b
BLAKE2b-256 checksum
How to use checksums
b19635a96e00bcb3c7e535adb2f891f2338b76233d046d615e8faa6b0386a3a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for outputdecorator 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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