pyprel
Python print elegant
setup
pip install pyprel
introduction
This module provides Python rendering functionality. It can render a dictionary such that it is displayed with indentations for illustration of hierarchy:
sample information:
name: ttH
generator: pythia8
cross section: 0.055519
variables:
zappo_n: 9001
trk_n: 147
number of events: 124883
k factor: 1.0201
ID: 169888
It can render and display logos:
____ _ _____ _ / ___|___ | | ___ _ __| ___| | _____ __ | | / _ \| |/ _ \| '__| |_ | |/ _ \ \ /\ / / | |__| (_) | | (_) | | | _| | | (_) \ V V / \____\___/|_|\___/|_| |_| |_|\___/ \_/\_/
It can center blocks of text for terminal output (such as in a way shown for the logo above). It can render segment displays:
_ _ _ _ _ _ _ _ | | | _| _||_||_ |_ ||_||_| |_| ||_ _| | _||_| ||_| _|
It can render and display tables of various specified widths and column widths with various text wrapping features and delimiters:
|---------------------------------------------------| |heading 1 |heading 2 | |---------------------------------------------------| |some text |some more text | |---------------------------------------------------| |lots and lots and lots |some more text | |and lots and lots of text| | |---------------------------------------------------|
|---------------------------| |heading 1 |heading 2 | |---------------------------| |some text |some more | | |text | |---------------------------| |lots and lots|some more | |and lots and |text | |lots and lots| | |of text | | |---------------------------|
||----------------------------------------------------|| ||heading 1 ||heading 2 || ||----------------------------------------------------|| ||some text ||some more text || ||----------------------------------------------------|| ||lots and lots and lots ||some more text || ||and lots and lots of text|| || ||----------------------------------------------------||
|-----------------------------------------------------------------------------| |heading 1 |heading 2 |heading 3 | |-----------------------------------------------------------------------------| |some text |some more text |even more text | |-----------------------------------------------------------------------------| |lots and lots and lots |some more text |some more text | |and lots and lots of text| | | |-----------------------------------------------------------------------------|
|---------------------------------------------------------------------------| |heading 1 |heading 2 |heading 3 |heading 4 | |---------------------------------------------------------------------------| |some text |some more text |even more text |yeah more text | |---------------------------------------------------------------------------| |lots and lots and |some more text |some more text |some more text | |lots and lots and | | | | |lots of text | | | | |---------------------------------------------------------------------------|
It can provide color palettes, extend them and save images of them. Color palettes available can be viewed by saving images of them:
pyprel.save_images_of_palettes()
A palette can be loaded using its name:
pyprel.access_palette(name = "palette1")
A palette of colors can be extended to a required number of colors:
colors_1_extended = extend_palette(
colors = colors_1,
minimum_number_of_colors_needed = 15
)
references
palettes
Metadata
Release files for pyprel 2018.9.14.1501
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 |
|---|---|---|---|---|
| pyprel-2018.9.14.1501.tar.gz | 8.3 kB | Without provenance | Details for pyprel-2018.9.14.1501.tar.gz |
Release files / pyprel-2018.9.14.1501.tar.gz
| Download URL | pyprel-2018.9.14.1501.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faf81cf957e3ee1e27e622b75d88d934e9030358c1d5d7d6ee56c9ebbd0d49cd
|
|
BLAKE2b-256 checksum How to use checksums |
bbd7235b02aea9d1f57e5877a1592297feb74b9d1f57408984f8e676e8df7201
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for pyprel 2018.9.14.1501
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.