Minimalistic python module to print colorful messages
Project description
error-helper
This is a minimalistic python module which helps you print colorful messages for CLI tools. It's available on PyPi, but you can also add it to your project as a git submodule.
Usage
>>> from error_helper import *
>>> info("this is information") # output will be blue
this is information
>>> hint("this is less important information") # output will be grayed out
this is less important information
>>> warning("something didn't go quite right...") # output will be yellow
warning: something didn't go quite right...
>>> error("something went terribly wrong") # output will be red
error: something went terribly wrong
>>> success("completed the operation!") # output will be green
successfully completed the operation!
prompt(...) and prompt_input(...)
The prompt(...) function, by default, prints a newline, followed by the provided values,
a colon and another newline:
>>> prompt("enter the server url")
enter the server url:
>>>
The prompt_input(...) function, by default, prints the provided values, followed by a colon
and a space. Then it calls the default input(...) function and returns it's result. The result
will be stripped if strip=True (default).
>>> prompt("enter the server url"); url = prompt_input("url:")
enter the server url:
url: https://30350n.de
>>> url
'https://30350n.de'
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file error_helper-1.5.tar.gz.
File metadata
- Download URL: error_helper-1.5.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee46f31a689db19ce1a04e69f437639faa0373e1d4ce4374db2912d1ed09a1d6
|
|
| MD5 |
f1a8f52cfae265bf0731b6d508b0301b
|
|
| BLAKE2b-256 |
708bccc4ebf65e3e6ea3144f7c5f3d0ac3a3f2c9382421856d58fbd21c953d38
|
Provenance
The following attestation bundles were made for error_helper-1.5.tar.gz:
Publisher:
publish.yaml on 30350n/error_helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
error_helper-1.5.tar.gz -
Subject digest:
ee46f31a689db19ce1a04e69f437639faa0373e1d4ce4374db2912d1ed09a1d6 - Sigstore transparency entry: 572560810
- Sigstore integration time:
-
Permalink:
30350n/error_helper@75eeab0e2c492d23a2b8efca52d8072a12b4ac12 -
Branch / Tag:
refs/tags/1.5 - Owner: https://github.com/30350n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@75eeab0e2c492d23a2b8efca52d8072a12b4ac12 -
Trigger Event:
release
-
Statement type:
File details
Details for the file error_helper-1.5-py3-none-any.whl.
File metadata
- Download URL: error_helper-1.5-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe3b0d05b843ff7eba0436519ddebdce6825d00aeb29c386824decc09d56673f
|
|
| MD5 |
eb6db4e882462cd0f8b82ee9bc56c0bd
|
|
| BLAKE2b-256 |
e7952e28e21f9a458ce88328796c73fab57376c716f4e56d157a650588026d96
|
Provenance
The following attestation bundles were made for error_helper-1.5-py3-none-any.whl:
Publisher:
publish.yaml on 30350n/error_helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
error_helper-1.5-py3-none-any.whl -
Subject digest:
fe3b0d05b843ff7eba0436519ddebdce6825d00aeb29c386824decc09d56673f - Sigstore transparency entry: 572560817
- Sigstore integration time:
-
Permalink:
30350n/error_helper@75eeab0e2c492d23a2b8efca52d8072a12b4ac12 -
Branch / Tag:
refs/tags/1.5 - Owner: https://github.com/30350n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@75eeab0e2c492d23a2b8efca52d8072a12b4ac12 -
Trigger Event:
release
-
Statement type: