{"repo":"bluenote10/yachalk","free":true,"listed":false,"github":"https://github.com/bluenote10/yachalk","clone":"git clone https://github.com/bluenote10/yachalk.git","description":"🖍️ Terminal string styling done right","language":"Python","stars":170,"topics":["python","terminal","console","color","ansi","ansi-escape-codes","chalk"],"license":"MIT","category":"cli-tools","readme_excerpt":"Terminal string styling done right This is a feature-complete clone of the awesome Chalk (JavaScript) library. All credits go to Sindre Sorhus . --- Highlights - Fluent, auto-complete-friendly API for maximum coding efficiency - Ability to nest styles - Proper handling of styling edge cases (same test cases as Chalk) - Auto-detection of terminal color capabilities - 256/Truecolor color support, with fallback to basic colors depending on capabilities - Same conventions as Chalk to manually control color modes via FORCE COLOR - No dependencies - Fully typed (mypy strict), no stubs required Install The only requirement is a modern Python (3.6+). Usage Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Easily define and re-use your own themes: Prior art: Why yet another chalk clone? The Python ecosystem has a large number libraries for terminal styling/coloring. However, after working with Chalk in JavaScript for a while, I always missed to have the same convenience in Python. Inspired by Chalk, I wanted to have a terminal styling library satisfying the following design criteria: - Automatic reset handling : Many Python libraries require manual handling of ANSI reset codes. This is error prone, and a common source of coloring issues. It also means that these libraries cannot handle advanced edge cases like proper handling of newlines in all contexts, because that requires internal reset handling. - Single symbol import : Some librari","default_branch":null,"files":null,"tree":[],"storefront":"/r/bluenote10","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bluenote10/yachalk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}