{"id":13460108,"url":"https://github.com/tartley/colorama","last_synced_at":"2025-05-12T03:45:51.960Z","repository":{"id":16146625,"uuid":"18892209","full_name":"tartley/colorama","owner":"tartley","description":"Simple cross-platform colored terminal text in Python","archived":false,"fork":false,"pushed_at":"2025-03-14T02:07:23.000Z","size":461,"stargazers_count":3667,"open_issues_count":127,"forks_count":261,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-05-09T00:02:30.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tartley.png","metadata":{"files":{"readme":"README-hacking.md","changelog":"CHANGELOG.rst","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=2MZ9D2GMLYCUJ\u0026item_name=Colorama\u0026currency_code=USD"],"tidelift":"pypi/colorama"}},"created_at":"2014-04-17T20:18:25.000Z","updated_at":"2025-05-08T10:02:14.000Z","dependencies_parsed_at":"2024-06-18T11:14:53.228Z","dependency_job_id":"7bbfef51-c515-4e15-93dd-9c7f6788af0f","html_url":"https://github.com/tartley/colorama","commit_stats":{"total_commits":279,"total_committers":49,"mean_commits":"5.6938775510204085","dds":0.7096774193548387,"last_synced_commit":"136808718af8b9583cb2eed1756ed6972eda4975"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartley%2Fcolorama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartley%2Fcolorama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartley%2Fcolorama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tartley%2Fcolorama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tartley","download_url":"https://codeload.github.com/tartley/colorama/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166509,"owners_count":21864482,"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":[],"created_at":"2024-07-31T10:00:35.676Z","updated_at":"2025-05-12T03:45:51.938Z","avatar_url":"https://github.com/tartley.png","language":"Python","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=2MZ9D2GMLYCUJ\u0026item_name=Colorama\u0026currency_code=USD","https://tidelift.com/funding/github/pypi/colorama"],"categories":["语言资源库","Python","HarmonyOS","Desktop App Development","命令行界面开发","Command-line Interface Development","Uncategorized","CLI Development","Python 🐍"],"sub_categories":["python","Windows Manager","Python Toolkit","Uncategorized"],"readme":"# Colorama Development\n\nHelp and fixes are welcome!\n\nAlthough Colorama has no requirements other than the Python standard library,\ndevelopment requires some Python packages, which are captured in\nrequirements-dev.txt.\n\nThroughout, if you're on a Mac, you can probably do something similar to the\nLinux instructions. Either use the makefile directly, or look in it to see\nwhat commands it executes, and manually execute something similar. PRs to\nautomate for Mac appreciated! Especially if they just made the existing Linux\nMakefile targets work on Mac too.\n\n## Desired changes\n\nColorama is unexpectedly popular, and is now a transitive dependency of many\npopular and high profile projects. If we break backwards compatibility, even in a\nsubtle way, we can break applications - or pip installs - for lots of people.\n\nIn addition, the project already takes more time \u0026 energy to maintain than\nthe maintainers currently have available - for example the original author\nis now a parent, and no longer uses Windows, so time and motivation for this\nproject are both much lower than they used to be.\n\nAs a result of both the above, we are very conservative in what sorts of\nchanges we can accept. Generally, we are not keen on new features. Even if\nthey are small, they still add to the future maintenance burden, increasing\nthe surface area into which future bugs or compatibility breaks could be\nintroduced.\n\nThis is especially true if they are new ways to generate ANSI codes (e.g.\ncontext managers for handling Fore, Back or Style changes.), since it has\nalways been Colorama's stance that if you want to print ANSI codes, then yes\nwe can help out with that in a rudimentary way, but if you want to do advanced\nthings, then you should be using a different library that specializes in that,\nsuch as Termcolor, Blessings, or Rich. These libraries are much better than\nColorama at generating ANSI codes for colors and the like, and probably\nalready include the feature you are trying to add to Colorama, plus many\nmore.\n\nIn addition to using those libraries, if you call colorama.init(), then your\nfancy new colors, etc, will also work on Windows. This is the main purpose\nof Colorama.\n\nThe kinds of submissions we would encourage work towards that goal, or fix\nbugs, or improve compatibility across operating systems or environments.\n\n## Makefile and PowerShell scripts\n\nSome common commands are captured as Linux makefile targets (which could\nperhaps be coaxed into running on OSX in Bash), and as Windows PowerShell\nscripts.\n\n| Task                            | Linux               | Windows              |\n|---------------------------------|---------------------|----------------------|\n| Create \u0026 populate virtualenv.   | `make bootstrap`    | `.\\bootstrap.ps1`    |\n| Run tests.                      | `make test`         | `.\\test.ps1`         |\n| Build a wheel.                  | `make build`        | `.\\build.ps1`        |\n| Test the wheel.                 | `make test-release` | `.\\test-release.ps1` |\n| Release the wheel on PyPI       | `make release`      | `.\\release.ps1`      |\n| Clean generated files \u0026 builds. | `make clean`        | `.\\clean.ps1`        |\n\nThe Makefile is self-documenting, so 'make' with no args will describe each\ntarget.\n\n## Release checklist\n\n1. Check the CHANGELOG.rst is updated with everything since the last release,\n   including links to merged PRs. Move the \"Current release\" comment from the\n   previous version number.\n\n2. First we'll make a candidate release. Ensure  the '.rc1' suffix is\n   present on `__version__` in `colorama/__init.py__.py`, eg:\n\n        __version__ = '0.4.6rc1'\n\n3. Run the tests locally on your preferred OS, just to save you from doing\n   the subsequent time-consuming steps while there are still obvious problems\n   in the code:\n\n   * Windows:\n     * First allow powershell to execute scripts, see:\n       https://stackoverflow.com/a/32328091\n     * `powershell bootstrap.ps1`\n     * `powershell test.ps1`\n   * Linux:\n     * `make bootstrap`\n     * `make test`\n\n4. Verify you're all committed, merged to master.\n\n5. Tag the current commit with the `__version__` from `colorama/__init__.py`.\n   We should start using\n   [annotated tags for releases](https://www.tartley.com/posts/git-annotated-tags), so:\n\n       git tag -a -m \"\" $version\n       git push --follow-tags\n\n6. Build the distributables (sdist and wheel), on either OS:\n\n    * Windows: `.\\build.ps1`\n    * Linux: `make build`\n\n7. Test the distributables on both OS. Whichever one you do 2nd will get an\n   HTTP 400 response on uploading to test.pypi.org, but outputs a message\n   saying this is expected and carries on:\n\n   * Windows: `.\\test-release.ps1`\n   * Linux: `make test-release`\n\n   (This currently only tests the wheel, but\n   [should soon test the sdist too](https://github.com/tartley/colorama/issues/286).)\n\n8. Check the [CI builds](https://github.com/tartley/colorama/actions/)\n   are complete and all passing.\n\n9. Upload the distributables to PyPI:\n\n   * On Windows: `.\\release.ps1`\n   * On Linux: `make release`\n\n10. Test by installing the candidate version from PyPI, and sanity check it with\n    'demo.sh', making sure this is running against the PyPI installation, not\n    local source.\n\n11. Maybe wait a day for anyone using pre-release installs to report any\n    problems?\n\n12. Remove the '.rcX' suffix from `__version__` in\n    `colorama/__init__.py`.\n\n13. Repeat steps 4 to 9, for the actual (non-candidate) release.\n\n14. Bump the version number in `colorama/__init__.py`, and add a 'dev1'\n    suffix, eg:\n\n    `0.4.5dev1`\n\n    so that any build artifacts created are clearly labelled as not a real\n    release. Commit and push this (directly to master is fine.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftartley%2Fcolorama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftartley%2Fcolorama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftartley%2Fcolorama/lists"}