Sty

Latest version: v1.0.6

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

1.0.0rc.2

This release fixes a nasty typo within the `reset` register. (Thanks a lot technikian for fixing this!)

Unfortunately this introduces a minor breaking change....

Breaking Changes

* Renamed `sty.rs.rs` into `sty.rs.ef`.

1.0.0rc.1

This should be the last breaking change for any version which starts with `1.`

Breaking Changes

* Deprecated methods `.set_style(...)` and `.get_style(...)` were finally removed.

Non Breaking Changes

* sty is now fully typed.

1.0.0rc.0

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

The grey palette changed from:

python
li_black = Rule(Render.sgr, 90)
black = Rule(Render.sgr, 30)
da_black = Rule(Render.eightbit_fg, 0)

li_white = Rule(Render.sgr, 97)
white = Rule(Render.sgr, 37)
da_white = Rule(Render.eightbit_fg, 249)


to:

python
black = Rule(Render.sgr, 30)
da_grey = Rule(Render.sgr, 90)
grey = Rule(Render.eightbit_fg, 249)
li_grey = Rule(Render.sgr, 37)
white = Rule(Render.sgr, 97)


Which means:

* `li_black` is now `da_grey`
* `black` remains `black`
* `da_black` is now `black`
* `li_white` is now `white`
* `white` is now `li_grey`
* `da_white` is now `grey`

Non Breaking Changes

The effect-register and the reset-register now have a `ef.rs` and a `rs.ef` attribute, these can be used for resetting all effects in one go. E.g.:

python
a = f"{ef.bold}{ef.italic}hello world{ef.rs}"

1.0.0beta.12

Release 1.0.0b12. Multiple changes:

* Implement `Style()` type: This changes the way in which Sty's `Register()` class sets, reads and renders styling rules. This allows for a more Pythonic customization interface.
This change obsoletes `set_style()` and `get_style()`, thus the two methods are now deprecated.
* Change yapf line-length to 88.

Documentation will be update with the next commits.

Breaking Changes

There are two breaking changes within the customization interface, which are easy to fix:

* `sty.Base` was renamed to `sty.Register`.
* `sty.Render` was renamed to `sty.RenderType`.

1.0.0beta.11

The Base class was refactored as a follow up of 17. The Base class doesn't need to derive from `dict` anymore. We now derive from `object`. This makes the code somewhat simpler. It also increased access performance a lot.

There are some basic access performance tests in the `tests` directory now.

Breaking Changes

The refactoring of the Base class let to one simple change in the customization interface.

When you create a register class, you now have to call `super().__init__()`, inside the `__init__()` method:

python
class FgRegister(Base):

yellow: str
red: str
...

def __init__(self):

super().__init__() <--- This is necessary now.

self.set_renderfunc(Sgr, renderfunc.sgr)
self.set_renderfunc(EightbitFg, renderfunc.eightbit_fg)
...

1.0.0beta.10

This release contains some bug fixes and cleanups.

Fixed issues:

* Broken Python attribute protocol. 17
* Double is_muted. 18
* Fix pypi project description. 20

Breaking changes

sty's minimal required version increased from `3.5` to `3.6`.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.