Skip to content

noah-yoshida/prettycli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎨 prettycli 🌟

Dependency free pretty CLI printing in Python (colors, unicode boxes, etc). More to come!

Installation

$ python3 -m pip install prettycli

from prettycli import red, blue, yellow, color

# You can print a basic color by passing a string into the color object
print(red("this is red"))

# You can add other attributed to what you print by calling methods on the
# color objects
print(red("this is red and bold").bold())

# You can set the background by passing in a color object to the bg method
print(red("this is red, with a blue background").bg(blue))

# We even support true colors! You can use the base object 'color' and modify
# the foreground with the rgb method
print(color("This was made with true color rgb").rgb(60, 100, 120))

Color module demo

Demo Gif Made with asciinema

Ignore the bold thing it is a bug with asciinema

Also ignore the old import name

Box module demo

_Made with asciinema_

If you want something that can be used in shell scripting, I have another repo: noyoshi/bashcolors

TODO

  • Performance checks - this should be as lightweight as possible
  • Unit tests
  • No more dynamic variable definitions, as that messes with linters
  • box.py demo + better abstractions

About

🎨 command line output utils for Python to draw boxes, colors, etc

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages