colourout
A Python package for printing coloured text to the terminal.
Installation
Install this package using pip:
pip install colourout
API
The colourout package provides two functions, and an Enum for the available colours.
printc
The printc utilises the builtin print function to print coloured text to the terminal.
from colourout import printc
printc("Hello, World!", styles=["BLUE", "UNDERLINE"])
>>> \033[34m\033[4mHello, World!\033[0m
eprintc
The eprintc function is the same as printc, but prints to stderr instead of stdout.
from colourout import eprintc
eprintc("Hello, World!", styles=["RED", "BOLD"])
>>> \033[31m\033[1mHello, World!\033[0m
Styles
The Styles enum provides a list of available styles.
from colourout import Styles, printc
printc(
"Hello, World!",
styles=[Styles.BLUE, Styles.UNDERLINE],
)
>>> \033[34m\033[4mHello, World!\033[0m
Contributing
Fork the repository and clone it locally.
Make any changes you want and then submit a pull request.
Ensure all tests are passing and that you have added tests for any new functionality.
Run testing, formatting, and linting by using nox.
You can run individual sessions by using the -s flag with nox.
For example:
nox -s test
nox -s lint
Code is formatted and linted upon commit using the pre-commit tool.
Make sure to install the pre-commit config using pre-commit install once you have installed the requirements-dev.txt dependencies.
You can check that everything is passing by running pre-commit after git add-ing your files to a commit.
NOTE: Tests are not run with
pre-commitdue to performance issues, please ensure to runnoxto validate tests.
Authors
- Sam Kenney - Initial release - sam-kenney
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Metadata
Release files for colourout 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| colourout-0.1.1.tar.gz | 4.1 kB | Without provenance | Details for colourout-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| colourout-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for colourout-0.1.1-py3-none-any.whl |
Total release size: 9.9 kB
Release files / colourout-0.1.1.tar.gz
| Download URL | colourout-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53dbd769662a695b7889376ca2ebebf4b300e4ff6282009b65798914b6364cbe
|
|
BLAKE2b-256 checksum How to use checksums |
06abcaf6a915993713ca81ea8751c448154f86559fc0b7c483d8e848ffc53122
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Release files / colourout-0.1.1-py3-none-any.whl
| Download URL | colourout-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6dd0a1b635fd35a28ea3dd696badb2a2ed950bfb18b5e7fdf4492f2e19c13cd0
|
|
BLAKE2b-256 checksum How to use checksums |
51386c62112e9ffebafc98f27605c1e582616f4889e2d19c9df343809fcf940f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Security for colourout 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.