Skip to main content

oori's miscellaneous python toolkit

Project description

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)

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

utiloori-0.4.0.tar.gz (299.3 kB view details)

Uploaded Source

Built Distribution

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

utiloori-0.4.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file utiloori-0.4.0.tar.gz.

File metadata

  • Download URL: utiloori-0.4.0.tar.gz
  • Upload date:
  • Size: 299.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for utiloori-0.4.0.tar.gz
Algorithm Hash digest
SHA256 bf8922222bc05e03b89edf5cab1cc8ce2b551178b4d42d5fa723bdc28d00c478
MD5 ed29c8ec54cc6e912c38f844bc7b42c7
BLAKE2b-256 5448a2a87c2d381b6161acfcc8f6e4df16b938ad35481b7579dc648c21c5bf9d

See more details on using hashes here.

File details

Details for the file utiloori-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: utiloori-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for utiloori-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acf6a97eeb7433ae1f7ebf122a8f96e20853a6550ef47fb399e1f520964b6f9e
MD5 72ebefbd11a6f568422dc03f878e8761
BLAKE2b-256 23c1869d469f27822e51ca5475920f19b5b1750698a1ed3417a2e336101356cb

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