Skip to main content

Utiloori - oori's miscellaneous toolkit

Utiloori is primarily developed by the crew at Oori Data. We offer software engineering services around LLM applications.

PyPI - Version PyPI - Python Version

Table of contents:

Print ansi colors in terminal

Wraps text in ANSI color codes (and terminators) for printing colored text to console.

Some terminals, notably VSCode's, try to be clever about not displaying unreadable text; they might override the font color you specify if you specify a background color that is too similar to the font color. For example, if you specify a black font color on a red background, VSCode will override the font color to white.

colors

the following "standard" ansi colors are supported:

  • black
  • red
  • green
  • yellow
  • blue
  • purple
  • cyan
  • white

Usage

from utiloori.ansi_color import ansi_color

print string with green font:

green_string = ansi_color('lorem', 'green')
print(green_string)

print string with purple background (with default, white font):

purple_bg_string = ansi_color('ipsum', bg_color='purple')
print(purple_bg_string)

print string with red font on a blue background:

red_on_blue_string = ansi_color('dolor', 'red', 'blue')
print(red_on_blue_string)

Metadata

Release files for utiloori 0.4.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 utiloori 0.4.0
File Size Uploaded
utiloori-0.4.0.tar.gz 299.3 kB Details

Built distribution (wheel)

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

Total release size: 314.6 kB

Release files / utiloori-0.4.0.tar.gz

Download URL utiloori-0.4.0.tar.gz
Size 299.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bf8922222bc05e03b89edf5cab1cc8ce2b551178b4d42d5fa723bdc28d00c478
BLAKE2b-256 checksum
How to use checksums
5448a2a87c2d381b6161acfcc8f6e4df16b938ad35481b7579dc648c21c5bf9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / utiloori-0.4.0-py3-none-any.whl

Download URL utiloori-0.4.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acf6a97eeb7433ae1f7ebf122a8f96e20853a6550ef47fb399e1f520964b6f9e
BLAKE2b-256 checksum
How to use checksums
23c1869d469f27822e51ca5475920f19b5b1750698a1ed3417a2e336101356cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

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