.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_logo.png :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_logo.png :alt: sty_logo
|
|badge-total-downloads| |badge-monthly-downloads|
.. |badge-total-downloads| image:: https://static.pepy.tech/personalized-badge/sty?period=total&units=international_system&left_color=grey&right_color=lightgrey&left_text=downloads :target: https://static.pepy.tech/personalized-badge/sty?period=total&units=international_system&left_color=grey&right_color=lightgrey&left_text=downloads :alt: badge-total-downloads
.. |badge-monthly-downloads| image:: https://static.pepy.tech/personalized-badge/sty?period=month&units=international_system&left_color=grey&right_color=lightgrey&left_text=downloads/month :target: https://static.pepy.tech/personalized-badge/sty?period=month&units=international_system&left_color=grey&right_color=lightgrey&left_text=downloads/month :alt: badge-monthly-downloads
.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_demo.png :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_demo.png :alt: sty_demo :width: 600px
Sty v1.0.0 released 🎉
At this point sty can be considered stable.
The "release candidate" phase was given a lot of time and nothing critical was reported for a while. All features that are planned for the future are compatible with the existing interfaces.
Nothing changed since rc.2
.
Release Note (Breaking Changes) <https://github.com/feluxe/sty/releases/tag/1.0.0-rc.2>
__
.set_style(...)
and .get_style(...)
were finally removed.Release Note <https://github.com/feluxe/sty/releases/tag/1.0.0-rc.1>
__
Sty version 1.0.0
is now feature complete.
>=3.7
indefinitely.semver
so there won't be any breaking changes for version 1.x.x
after 1.0.0 was released.rc.0
). I'll release 1.0.0
in a couple of month if no major bugs are reported.Release Note (Breaking Changes) <https://github.com/feluxe/sty/releases/tag/1.0.0-rc.0>
__
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.
bold
, italic
, underline
, etc.shim <https://github.com/feluxe/sty/issues/2#issuecomment-501890699>
__ to work.colorama
overrides sys.stdout
which causes a lot of trouble.semver <https://semver.org/>
__>=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:: 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 :alt: example :width: 600px
Documentation-Website: https://sty.mewo.dev
Documentation-Website-Source: https://github.com/feluxe/sty-docs
Version | Tag | Published |
---|---|---|
1.0.4 | 6mos ago | |
1.0.3 | 6mos ago | |
1.0.2 | 6mos ago | |
1.0.1 | 6mos ago |