Skip to main content

PyUCC

An Unoptimezed Console Colorization tool written in python.

How to Install

This python project was converted to a pypi package, to install this package you can just use pip.

pip install pyucc

Usage

After installing the package with pip, all you need to do is import it like you would any other package and work on colorizing your precious console. This package relies on ANSI Unicode Escape Sequences to allow for coloring in the rgb space inside your console.

from pyucc import console, colors

# Use cprint or colored print just like you would pythons print method.
console.cprint(colors.vibrant_red, "This text is in red")

# You can also use formatting
console.cprint(f"{colors.vibrant_red}This text is also in red")

# Use .switch for background switch
console.cprint(f"{colors.vibrant_red.switch}This text has a red background")

Basic Red Text

There are some more advanced use cases like registering your own console class:

from pyucc import console, colors, symbols

@console.register(identifier="test")
def test(*values, **optional):
  # Optional can be used to access "optional" values like time.
  time = optional.get("time")
  console.cprint(f"{colors.vibrant_purple.switch} Debug {symbols.reset} {colors.chex('#aaaaaa')}{time}{symbols.reset}", *values)

console.test("This is the test method")

Advanced customized console

Also, cprint can be used as print if you need to.

from pyucc import console
console.cprint("This is just a print")

Metadata

Release files for pyucc 1.7

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

Source distribution (sdist)

Source distribution for pyucc 1.7
File Size Uploaded
pyucc-1.7.tar.gz 7.6 kB Details

Built distribution (wheel)

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

Total release size: 15.8 kB

Release files / pyucc-1.7.tar.gz

Download URL pyucc-1.7.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
813d17e6ff5536f6a0060577b328d725113d89759f932414a54a79011d541af1
BLAKE2b-256 checksum
How to use checksums
e5f11a43e008c910ed3cbb6d59566b59905ea8306839447ae386c7f5eb123eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / pyucc-1.7-py3-none-any.whl

Download URL pyucc-1.7-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
476b9957a47e61a68424a7f6c0a327d735f77c8b8ec46c59e8e798e388bd7600
BLAKE2b-256 checksum
How to use checksums
dfb16ec8fb85c90d950bd72fdb4cfa7d11143cee44017a5b101df8c6f926a0c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

1.7 This release

2 release files

1.6

2 release files

1.5

2 release files

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