Skip to main content

Introduction

Colored Output = c_out

You don't have to tell me how monotonous it is to use the same old print statement in python, as there is no option to format it. Moreover, we all have faced problems while debugging our code with countless print statements but no way to highlight any of it.

Well we can definitely install/import third-party packages, but some of us just prefer the old school solutions.

I have a simple, yet effective solution for you. What if I tell you, it is possible to create a custom class yourself which can format the output in the terminal?

Using this module you can directly format the output you see in your command line interface without using any external packages.
It uses ANSI Escape Codes to format the standard output.

Installation

pip install c_out

Usage

Import

from c_out.beauty_print import c_out, TextColor, BackgroundColor, Style

Different Ways to use

Normal print

c_out("Hello World")  

Print with just text color

c_out("Hello World", text_color=TextColor.BLUE)  

Print with just background color

c_out("Hello World", bg_color=BackgroundColor.BLACK)  

Print with text color and background color

c_out("Hello World", text_color=TextColor.RED, bg_color=BackgroundColor.BLACK, styles=[Style.BOLD])  

Print with text color, background color and font styles

c_out("Hello World", text_color=TextColor.RED, bg_color=BackgroundColor.BLACK, styles=[Style.BOLD])  
c_out("Hello World", text_color=TextColor.RED, bg_color=BackgroundColor.BLACK, styles=[Style.BOLD, Style.STRIKETHROUGH, Style.ITALIC])

Print with separator and text color

c_out("Hello", "World", text_color=TextColor.RED, sep='\n')  

Print with end of line and text color

c_out("Hello", "World", text_color=TextColor.RED, end='\t')  

And there are many more combinations that you can try yourself.

Choices

Current Choices for TextColor

  • BLACK
  • RED
  • GREEN
  • ORANGE
  • BLUE
  • PURPLE
  • CYAN
  • LIGHTGREY
  • DARKGREY
  • LIGHTRED
  • LIGHTGREEN
  • YELLOW
  • LIGHTBLUE
  • PINK
  • LIGHTCYAN

Current Choices for BackgroundColor

  • BLACK
  • RED
  • GREEN
  • ORANGE
  • BLUE
  • PURPLE
  • CYAN
  • LIGHTGREY

Current choices for Styles

  • BOLD
  • UNDERLINE
  • ITALIC
  • STRIKETHROUGH
  • SELECTED

Metadata

Release files for c-out 1.0

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

Source distribution (sdist)

Source distribution for c-out 1.0
File Size Uploaded Provenance Actions
c_out-1.0.tar.gz 4.1 kB Without provenance Details for c_out-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for c-out 1.0
File Interpreter ABI Platform Actions
c_out-1.0-py3-none-any.whl Python 3 none any Details for c_out-1.0-py3-none-any.whl

Total release size: 8.4 kB

Release files / c_out-1.0.tar.gz

Download URL c_out-1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74d32c4621ebb2175c6d8d9ed262011b18c93b910ab6fd23fb00275d676e5ed2
BLAKE2b-256 checksum
How to use checksums
df9ac4734fa472fd7d6117d0fe2fe99822d692d9c32fb5014745f91cd263f455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.3

Release files / c_out-1.0-py3-none-any.whl

Download URL c_out-1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90dfc7adf62641c4c6a4f905cee27abe3cabe0882d2dbef8b657ab5ecd044ecd
BLAKE2b-256 checksum
How to use checksums
8819f802a64615fa100e651e7c154602855deecc7b851963ac97ef912c01e083
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.3

Security for c-out 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.

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