All Projects → feluxe → Sty

feluxe / Sty

Licence: apache-2.0
String styling for your terminal.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Sty

Mitype
Typing speed test in terminal
Stars: ✭ 241 (+86.82%)
Mutual labels:  terminal-based, terminal, command-line
Py cui
A python library for intuitively creating CUI/TUI interfaces with widgets, inspired by gocui.
Stars: ✭ 380 (+194.57%)
Mutual labels:  terminal-based, terminal, command-line
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-2.33%)
Mutual labels:  terminal-based, terminal, command-line
Crossline
A small, self-contained, zero-config, MIT licensed, cross-platform, readline and libedit replacement.
Stars: ✭ 53 (-58.91%)
Mutual labels:  terminal, command-line, color
Tsukae
🧑‍💻📊 Show off your most used shell commands
Stars: ✭ 345 (+167.44%)
Mutual labels:  terminal-based, terminal, command-line
Rang
A Minimal, Header only Modern c++ library for terminal goodies 💄✨
Stars: ✭ 1,080 (+737.21%)
Mutual labels:  terminal, command-line, color
Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+10084.5%)
Mutual labels:  terminal, command-line
Kure
Secure, private and feature-rich CLI password manager
Stars: ✭ 87 (-32.56%)
Mutual labels:  terminal, command-line
Nord Hyper
An arctic, north-bluish clean and elegant Hyper theme plugin.
Stars: ✭ 96 (-25.58%)
Mutual labels:  terminal, color
Sbt Prompt
An SBT plugin for making your SBT prompt more awesome
Stars: ✭ 107 (-17.05%)
Mutual labels:  terminal, command-line
Sampler
Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file.
Stars: ✭ 9,203 (+7034.11%)
Mutual labels:  terminal, command-line
Tooling
Advancing Node.js as a framework for writing great tools
Stars: ✭ 98 (-24.03%)
Mutual labels:  terminal, command-line
Word Wrap
Wrap words to a specified length.
Stars: ✭ 107 (-17.05%)
Mutual labels:  terminal, command-line
Desktoppr
Simple command line tool to set the desktop picture on macOS
Stars: ✭ 127 (-1.55%)
Mutual labels:  terminal, command-line
Cli Boot.camp
💻 command-line bootcamp adventure in your browser
Stars: ✭ 88 (-31.78%)
Mutual labels:  terminal, command-line
Run
⚡The resource runtime
Stars: ✭ 90 (-30.23%)
Mutual labels:  terminal, command-line
Lua cliargs
A command-line argument parsing module for Lua.
Stars: ✭ 84 (-34.88%)
Mutual labels:  terminal, command-line
Colored
🎨 Mirror of colored library repository
Stars: ✭ 98 (-24.03%)
Mutual labels:  terminal, color
Ls colors
A collection of LS_COLORS definitions; needs your contribution!
Stars: ✭ 1,568 (+1115.5%)
Mutual labels:  terminal, color
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-15.5%)
Mutual labels:  terminal, command-line

.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_logo.png :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_logo.png :align: center :alt: sty_logo


.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_demo.png :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_demo.png :align: center :alt: sty_demo :width: 600px

Release 1.0.0-rc.1 (January 31. 2021)

  • Sty is now fully typed.
  • Deprecated methods .set_style(...) and .get_style(...) were finally removed.

Release Note <https://github.com/feluxe/sty/releases/tag/1.0.0-rc.1>__

Release 1.0.0-rc.0 (January 08. 2021)

Sty version 1.0.0 is now feature complete.

  • I'm going to support Python version >=3.7 indefinitely.
  • Sty will follow semver so there won't be any breaking changes for version 1.x.x after 1.0.0 was released.
  • This is a pre-release (rc.0). I'll release 1.0.0 in a couple of month if no major bugs are reported.

Breaking Changes <https://github.com/feluxe/sty/releases/tag/1.0.0-rc.0>__

Description

Sty's goal is to provide Python with a simple, customizable and performant string styling markup, which is decoupled from color palettes and terminal implementations.

  • Sty supports 3/4bit, 8bit and 24bit (truecolor/RGB) colors as well as effects like bold, italic, underline, etc.
  • Sty should work on most Unix platforms with most terminals. It works with recent Windows terminals. Window legacy terminal (cmd) needs a shim <https://github.com/feluxe/sty/issues/2#issuecomment-501890699>__ to work.
  • Sty comes with default color palettes and renderers, but you can easily replace/customize them, without touching the markup in your code.
  • Sty allows you to mute/unmute all styles in your codebase.
  • Sty provides high access performance for all styling rules.
  • Sty is fully typed, you should get good editor support for it.
  • Sty has no dependencies.
  • Sty follows semver <https://semver.org/>__
  • Sty will support Python >=3.7 for as long as possible.

If you run into compatibility problems with sty, please file an issue <https://github.com/feluxe/sty/issues>__!

Code Example

.. code:: python

from sty import fg, bg, ef, rs

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

# Add custom colors:

from sty import Style, RgbFg

fg.orange = Style(RgbFg(255, 150, 50))

buf = fg.orange + 'Yay, Im orange.' + fg.rs

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

The code above will print like this in the terminal:

.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_example.png :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_example.png :align: center :alt: example :width: 600px

Documentation

Documentation-Website: https://sty.mewo.dev

Documentation-Website-Source: https://github.com/feluxe/sty-docs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].