This is an easy to use Python library which allows you to make your terminal outputs more colorful and therefore easier to read and understand
Project description
This is an easy to use Python library which allows you to make your terminal outputs more colorful and therefore easier to read and understand.
It currently only works with Python3
The creator and maintainer is Jannik Ramrath (jramrath)
GitHub: https://github.com/jramrath/textColor
PyPi: https://pypi.org/project/textColor/
Contributing
If you've found a bug or a typo, feel free to open an Issue on GitHub. Already have a solution? Make a Pull request and I'll take a look at your changes. Please make sure a similar Issue/Pull request doesn't already exist.
Installation
This library is hosted on pypi.org. You can install it with pip:
pip install textColor
Usage
To use this library, you first have to import it:
from textColor import tc
To print colored text do the following:
print(tc.green("GREEN")) # 'GREEN' will be green
print(tc.red("RED")) # 'RED' will be red
print(tc.blue("BLUE")) # 'BLUE' will be blue
print(tc.yellow("YELLOW")) # 'YELLOW' will be yellow
You can also use special 'pre-fixes':
print(tc.input("Name: ")) # will output '[?] Name: ' while '[?]' is yellow
print(tc.info("Info")) # will output '[-] Info' while '[-]' is blue
print(tc.error("ERROR")) # will output '[!] ERROR' while '[!]' is red
print(tc.output("Success")) # will output '[>] Success' while '[>]' is green
License
This library was published under the GNU General Public License. For more information take a look at the LICENSE file.
Uploading to PyPi
More info here.
Remove all old distribution files in 'dist/'
Make sure you have the latest version of 'build':
python3 -m pip install --upgrade build
In the same directory as 'pyproject.toml':
python3 -m build
Now that the distribution files have been generated, make sure twine is up to date:
python3 -m pip install --upgrade twine
Again, in the same directory as 'pyproject.toml':
python3 -m twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for textcolor-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a77553630f482a9ea6bd3b4a28f4ba7fcc26e4a191c4d6ac6682e5983a45d4e7 |
|
MD5 | 37de2e68d4a3f679c9d240ef486d4117 |
|
BLAKE2b-256 | 95b604e82d03d834e10020c7305f89c9593227f814631610a9c225d4d7954bd9 |