{"id":22758824,"url":"https://github.com/getcuia/stransi","last_synced_at":"2026-03-12T14:17:15.863Z","repository":{"id":37835744,"uuid":"428436314","full_name":"getcuia/stransi","owner":"getcuia","description":"🖍️ A lightweight Python parser library for ANSI escape code sequences","archived":false,"fork":false,"pushed_at":"2023-03-08T23:01:51.000Z","size":379,"stargazers_count":24,"open_issues_count":9,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-29T10:42:57.212Z","etag":null,"topics":["ansi","ansi-colors","ansi-escape-codes","console","cuia","parser","python","stransi","terminal"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/stransi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getcuia.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2021-11-15T22:08:51.000Z","updated_at":"2025-09-18T06:07:06.000Z","dependencies_parsed_at":"2025-04-14T18:22:50.412Z","dependency_job_id":"0ec6bb2a-1303-4fe6-bc94-ab28ecfd17f7","html_url":"https://github.com/getcuia/stransi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/getcuia/stransi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getcuia%2Fstransi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getcuia%2Fstransi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getcuia%2Fstransi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getcuia%2Fstransi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getcuia","download_url":"https://codeload.github.com/getcuia/stransi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getcuia%2Fstransi/sbom","scorecard":{"id":424161,"data":{"date":"2025-08-11","repo":{"name":"github.com/getcuia/stransi","commit":"dee78ed603a9e4f8c506bc3cfe589d572aefdbd4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/getcuia/stransi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/getcuia/stransi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/getcuia/stransi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/getcuia/stransi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/getcuia/stransi/python-package.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/getcuia/stransi/python-package.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:39","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/python-package.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2024-4 / GHSA-2mqj-m65w-jghx","Warn: Project is vulnerable to: PYSEC-2023-165 / GHSA-cwvm-v4w8-q58c","Warn: Project is vulnerable to: PYSEC-2022-42992 / GHSA-hcpj-qp55-gfph","Warn: Project is vulnerable to: PYSEC-2023-137 / GHSA-pr76-5cm5-w9cj","Warn: Project is vulnerable to: PYSEC-2023-161 / GHSA-wfm5-v35h-vwf4","Warn: Project is vulnerable to: PYSEC-2022-42969"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T01:54:41.766Z","repository_id":37835744,"created_at":"2025-08-19T01:54:41.767Z","updated_at":"2025-08-19T01:54:41.767Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30428016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:00:25.264Z","status":"ssl_error","status_checked_at":"2026-03-12T13:59:52.690Z","response_time":114,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ansi","ansi-colors","ansi-escape-codes","console","cuia","parser","python","stransi","terminal"],"created_at":"2024-12-11T08:16:02.336Z","updated_at":"2026-03-12T14:17:15.834Z","avatar_url":"https://github.com/getcuia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI](https://img.shields.io/pypi/v/stransi)](https://pypi.org/project/stransi/)\n[![Python package](https://github.com/getcuia/stransi/actions/workflows/python-package.yml/badge.svg)](https://github.com/getcuia/stransi/actions/workflows/python-package.yml)\n[![PyPI - License](https://img.shields.io/pypi/l/stransi)](https://github.com/getcuia/stransi/blob/main/LICENSE)\n\n# [stransi](https://github.com/getcuia/stransi#readme) 🖍️\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg class=\"hero\" src=\"https://github.com/getcuia/stransi/raw/main/banner.jpg\" alt=\"stransi\" width=\"33%\" /\u003e\n\u003c/div\u003e\n\n\u003e I see a `\\033[1;31m`red`\\033[;39m` door, and I want it painted\n\u003e `\\033[1;30m`black`\\033[;39m`.\n\nstransi is a lightweight parser for\n[ANSI escape code sequences](https://en.wikipedia.org/wiki/ANSI_escape_code). It\nimplements a string-like type that is aware of its own ANSI escape sequences,\nand can be used to parse most of the common escape sequences used in terminal\noutput manipulation.\n\n## Features\n\n-   ✨ [Good support of ANSI escape sequences](FEATURES.md)\n-   🎨 Focus on coloring and styling\n-   🛡️ Unsupported `CSI` escape sequences are emitted as tokens\n-   🏜️ Only one dependency: [ochre](https://github.com/getcuia/ochre)\n-   🐍 Python 3.8+\n\n## Installation\n\n```console\n$ pip install stransi\n```\n\n## Usage\n\n```python\nIn [1]: from stransi import Ansi\n\nIn [2]: text = Ansi(\n   ...:     \"I see a \\033[1;31mred\\033[;39m door, \"\n   ...:     \"and I want it painted \\033[1;30mblack\\033[;39m\"\n   ...: )\n\nIn [3]: list(text.escapes())\nOut[3]:\n['I see a ',\n Escape('\\x1b[1;31m'),\n 'red',\n Escape('\\x1b[;39m'),\n ' door, and I want it painted ',\n Escape('\\x1b[1;30m'),\n 'black',\n Escape('\\x1b[;39m')]\n\nIn [4]: list(text.instructions())\nOut[4]:\n['I see a ',\n SetAttribute(attribute=\u003cAttribute.BOLD: 1\u003e),\n SetColor(role=\u003cColorRole.FOREGROUND: 30\u003e, color=Ansi256(1)),\n 'red',\n SetAttribute(attribute=\u003cAttribute.NORMAL: 0\u003e),\n SetColor(role=\u003cColorRole.FOREGROUND: 30\u003e, color=None),\n ' door, and I want it painted ',\n SetAttribute(attribute=\u003cAttribute.BOLD: 1\u003e),\n SetColor(role=\u003cColorRole.FOREGROUND: 30\u003e, color=Ansi256(0)),\n 'black',\n SetAttribute(attribute=\u003cAttribute.NORMAL: 0\u003e),\n SetColor(role=\u003cColorRole.FOREGROUND: 30\u003e, color=None)]\n```\n\n## Credits\n\n[Photo](https://github.com/getcuia/stransi/raw/main/banner.jpg) by\n[Tien Vu Ngoc](https://unsplash.com/@tienvn3012?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText)\non\n[Unsplash](https://unsplash.com/?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetcuia%2Fstransi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetcuia%2Fstransi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetcuia%2Fstransi/lists"}