{"id":20555279,"url":"https://github.com/feluxe/sty","last_synced_at":"2025-04-04T20:09:30.116Z","repository":{"id":47503433,"uuid":"121019060","full_name":"feluxe/sty","owner":"feluxe","description":"String styling for your terminal.","archived":false,"fork":false,"pushed_at":"2023-11-27T13:56:18.000Z","size":7153,"stargazers_count":210,"open_issues_count":11,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T19:07:26.827Z","etag":null,"topics":["color","coloring","command-line","python","python3","string","styling","terminal","terminal-based"],"latest_commit_sha":null,"homepage":"https://sty.mewo.dev","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feluxe.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-10T13:46:28.000Z","updated_at":"2025-03-15T15:58:47.000Z","dependencies_parsed_at":"2024-06-18T18:14:16.512Z","dependency_job_id":"db33a583-0845-488b-a327-85222cf136d3","html_url":"https://github.com/feluxe/sty","commit_stats":{"total_commits":102,"total_committers":3,"mean_commits":34.0,"dds":"0.019607843137254943","last_synced_commit":"417be3594c3f046d6ebefc812d0b20b7e5abb8b9"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feluxe%2Fsty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feluxe%2Fsty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feluxe%2Fsty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feluxe%2Fsty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feluxe","download_url":"https://codeload.github.com/feluxe/sty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color","coloring","command-line","python","python3","string","styling","terminal","terminal-based"],"created_at":"2024-11-16T03:17:33.573Z","updated_at":"2025-04-04T20:09:30.087Z","avatar_url":"https://github.com/feluxe.png","language":"Python","readme":"\n.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_logo_aliased.svg\n   :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_logo_aliased.svg\n   :alt: sty_logo\n   :width: 30%\n   :class: intro-logo\n\n|\n\n|badge-total-downloads| |badge-monthly-downloads|\n\n.. |badge-total-downloads| image:: https://static.pepy.tech/personalized-badge/sty?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=lightgrey\u0026left_text=downloads\n   :target: https://static.pepy.tech/personalized-badge/sty?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=lightgrey\u0026left_text=downloads\n   :alt: badge-total-downloads\n\n.. |badge-monthly-downloads| image:: https://static.pepy.tech/personalized-badge/sty?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=lightgrey\u0026left_text=downloads/month\n   :target: https://static.pepy.tech/personalized-badge/sty?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=lightgrey\u0026left_text=downloads/month\n   :alt: badge-monthly-downloads\n\n------------\n\n.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_demo.png\n   :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_demo.png\n   :alt: sty_demo\n   :width: 100%\n\n\nRelease 1.0.6 (November 27. 2023)\n---------------------------------\n\nCode Changes:\n\n* Use PEP-484 compatible exports to satisfy static type checkers.\n\n\nRelease 1.0.5 (November 22. 2023)\n---------------------------------\n\nCode Changes:\n\n* Add `py.typed` file for better typing support. Thanks! @Eisfunke\n* Use explicit imports: `from .lib import` is now `from sty.lib import`.\n* More and better doc-strings. `help(x)` should be much more useful now.\n\nOther:\n\n* Add svg logo. Thanks! @kubinka0505\n* Replace `pipenv` with `poetry`.\n* Remove `make.py` build system.\n* Remove all dev dependencies.\n\n\nDescription\n-----------\n\nSty's goal is to provide Python with a simple, customizable and performant string styling markup, which\nis decoupled from color palettes and terminal implementations.\n\n* Sty supports 3/4bit, 8bit and 24bit (truecolor/RGB) colors as well as effects like `bold`, `italic`, `underline`, etc.\n* Sty should work on most Unix platforms with most terminals. It works with recent Windows terminals. Window legacy terminal (cmd) needs a `shim \u003chttps://github.com/feluxe/sty/issues/2#issuecomment-501890699\u003e`__ to work.\n* Sty comes with default color palettes and renderers, but you can easily replace/customize them, without touching the markup in your code.\n* Sty allows you to mute/unmute all styles in your codebase.\n* Sty provides high access performance for all styling rules.\n* Sty is fully typed, you should get good editor support for it.\n* Sty does not implicitly mess with globals. E.g.: `colorama` overrides `sys.stdout` which causes a lot of trouble.\n* Sty has no dependencies.\n* Sty follows `semver \u003chttps://semver.org/\u003e`__.\n* Sty will support Python `\u003e=3.7` for as long as possible.\n\nIf you run into compatibility problems with sty, please file an `issue \u003chttps://github.com/feluxe/sty/issues\u003e`__!\n\n\nCode Example\n------------\n\n.. code:: python\n\n    from sty import fg, bg, ef, rs\n\n    foo = fg.red + 'This is red text!' + fg.rs\n    bar = bg.blue + 'This has a blue background!' + bg.rs\n    baz = ef.italic + 'This is italic text' + rs.italic\n    qux = fg(201) + 'This is pink text using 8bit colors' + fg.rs\n    qui = fg(255, 10, 10) + 'This is red text using 24bit colors.' + fg.rs\n\n    # Add custom colors:\n\n    from sty import Style, RgbFg\n\n    fg.orange = Style(RgbFg(255, 150, 50))\n\n    buf = fg.orange + 'Yay, Im orange.' + fg.rs\n\n    print(foo, bar, baz, qux, qui, buf, sep='\\n')\n\n\nThe code above will print like this in the terminal:\n\n.. image:: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_example.png\n   :target: https://raw.githubusercontent.com/feluxe/sty/master/assets/README_example.png\n   :alt: example\n   :width: 600px\n\n\nYou can use the `Register` class or the default registers `FgRegister`, `BgRegister`, `EfRegister` and `RsRegister` to create your own registers:\n\n.. code:: python\n\n    # Extending the default FgRegister\n\n    from sty import FgRegister, Style, RgbFg, Sgr\n\n    class MyFgRegister(FgRegister):\n\n        def __init__(self):\n            super().__init__()\n\n            self.purple = Style(Sgr(35))\n            self.blue = Style(Sgr(34))\n            self.orange = Style(RgbFg(255, 128, 0))\n            # ...\n\n     fg = MyFgRegister()\n\n\nDocumentation\n-------------\n\nDocumentation-Website: https://sty.mewo.dev\n\nDocumentation-Website-Source: https://github.com/feluxe/sty-docs\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeluxe%2Fsty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeluxe%2Fsty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeluxe%2Fsty/lists"}