Skip to main content

A high level, unoptimized, colored console written in python.

Project description

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")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyucc-1.7.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyucc-1.7-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file pyucc-1.7.tar.gz.

File metadata

  • Download URL: pyucc-1.7.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pyucc-1.7.tar.gz
Algorithm Hash digest
SHA256 813d17e6ff5536f6a0060577b328d725113d89759f932414a54a79011d541af1
MD5 06620eacec039179cc2b1e0575bdd2a6
BLAKE2b-256 e5f11a43e008c910ed3cbb6d59566b59905ea8306839447ae386c7f5eb123eb1

See more details on using hashes here.

File details

Details for the file pyucc-1.7-py3-none-any.whl.

File metadata

  • Download URL: pyucc-1.7-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pyucc-1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 476b9957a47e61a68424a7f6c0a327d735f77c8b8ec46c59e8e798e388bd7600
MD5 08e58e446bc390c07fb4c68e4d2aa0a6
BLAKE2b-256 dfb16ec8fb85c90d950bd72fdb4cfa7d11143cee44017a5b101df8c6f926a0c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page