Print Tools
Includes useful methods for stylized/formatted printing.
Install
python3 -m pip install print-tools
Usage
from print_tools.printer import Printer
p = Printer()
p.log('Printer initialized!')
Methods
__init__- style
- Default monokai, can use solarized as well
- Monokai Colors
- 'orange', 'magenta', 'purple', 'blue', 'seagreen', 'green', 'yellow'
- Solorized Colors
- 'yellow', 'orange', 'red', 'magenta', 'violet', 'blue', 'cyan', 'green'
- style
log- Logs text with bold date/time string in front of text
- Args
- text
error- Prints red ERROR: in front of text, log string optional
- Args
- text
- log (True)
success- Prints green SUCCESS: in front of text, log string optional
- Args
- text
- log (True)
arrow- Prints "-->" in front of text, indentation optional
- Args
- text
- indent (0)
chevron- Prints ">>>" in front of text, indentation optional
- Args
- text
- indent (0)
bullet- Prints "•" in front of text, indentation optional
- Args
- text
- indent (0)
format- Custom template formatting of strings
- Template formatting entered as so in string: i.e.
[bold:green]- format_op arg can be changed to different outside operator, must be two char string, i.e. "||" would yield
|bold:green|
- format_op arg can be changed to different outside operator, must be two char string, i.e. "||" would yield
- Modifiers must be entered first
- bold, italic, underlined, reset
- Foreground color must be entered next i.e.
[green] - Background color must be entered with on_ prefix i.e.
[on_blue] - Formatting can be removed with reset modifier, this can be mixed with new formatting i.e.
[reset:bold:green] - To remove specific formatting, enter no_ before argument, (one argument per block) i.e.
[no_bold][no_italic]- To remove foreground color
- `[no_foreground]
- To remove background color
- `[no_background]
- To remove foreground color
- By default the string formatting is cleared after the print statement, this can be changed by setting arg reset to False
- Additionally, the log string can be printed first by setting arg log to True
Metadata
Release files for print-tools 0.0.5
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 |
|---|---|---|---|---|
| print-tools-0.0.5.tar.gz | 3.5 kB | Without provenance | Details for print-tools-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| print_tools-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for print_tools-0.0.5-py3-none-any.whl |
Total release size: 7.3 kB
Release files / print-tools-0.0.5.tar.gz
| Download URL | print-tools-0.0.5.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36094f20e5d30ea968c129e69959181d936038bb326f8bfdbeff8559455cd66e
|
|
BLAKE2b-256 checksum How to use checksums |
dd62698c98c65ef249f562c32db89ed1233c2d07851f022d966548072a47fd42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Release files / print_tools-0.0.5-py3-none-any.whl
| Download URL | print_tools-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c73c9eec0f44f4199296cab53655f41193b7f4e747dcd922eb3a076182102e26
|
|
BLAKE2b-256 checksum How to use checksums |
07fd1c6f6e203ebe6d1e06f88d9f98b0d576fc7f4a7cf7e60bf220f2a688004a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for print-tools 0.0.5
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.