Skip to main content

No project description provided

Project description



Simple, flexible and extensible string styling for your terminal. Supports 3/4bit, 8bit and 24bit (truecolor, rgb) colors. Should work on most Unix platfroms with most terminals. Recent versions of Windows 10 should work with this as well.

Sty comes with default color palettes and renderers, but you can easily replace/customize them, without touching the markup.

Sty’s goal is to provide Python with a little string styling markup, which is decoupled from color palettes and terminal implementations.

Sty has no dependencies.

If you run into compatibility problems with sty, please file an issue!

Code Example

from sty import fg, bg, ef, rs, RgbFg

foo = + 'This is red text!' +
bar = + 'This has a blue background!' +
baz = ef.italic + 'This is italic text' + rs.italic
qux = fg(201) + 'This is pink text using 8bit colors' +
qui = fg(255, 10, 10) + 'This is red text using 24bit colors.' +

# Add new colors:

fg.set_style('orange', RgbFg(255, 150, 50))

buf = + 'Yay, Im orange.' +

print(foo, bar, baz, qux, qui, buf, sep='\n')

The code above will print like this in the terminal:



Project details

Download files

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

Files for sty, version 1.0.0b12
Filename, size File type Python version Upload date Hashes
Filename, size sty-1.0.0b12-py3-none-any.whl (10.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page