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.3.0.tar.gz (292.4 kB view details)

Uploaded Source

Built Distribution

utiloori-0.3.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utiloori-0.3.0.tar.gz
  • Upload date:
  • Size: 292.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for utiloori-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f890be31b84594bd91ccde006761c528e4c3e3fe622bb656891e1f7da07625c5
MD5 738ca92e71e9c8645ab77cdd42557205
BLAKE2b-256 1176bd95c8ff8289940ae66f68b8cc4e671fa3c02fcaa22dd3aff8a3b47b591e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: utiloori-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.4

File hashes

Hashes for utiloori-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69685f4c6ef019a20dcf54766f3655e242d7942343f664ace816d82044db9815
MD5 28d1532d1d872ceea4c904b928f72454
BLAKE2b-256 14beb7df7f24979898459d925d423557e11bcfaa23b4d526084295c2d208d249

See more details on using hashes here.

Supported by

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