py_oneliner
A Library build with a propose, single line console print across project to avoid unnecessary console prints. The Library has the capability to handle all print statements in one line across the project.
When there are multiple for loops iterating over a list of task and those task, again run have sub task which again have to be looped over, Therefore knowing their status of each loop during execution is essential, or knowing where the code has reached for that matter, keeping all that in mind the library is design, to just display a sequence of execution in one line console print, so user is aware about the progress.
Installation
pip install py-oneliner
Usage
One Line Print
from py_oneliner import one_liner
one_liner.one_line(tag="TEST", tag_data="TESTING PRINT")
One Line Print with Reset
to_reset_data will reset the fused print statement when specified tag is encountered
from py_oneliner import one_liner
one_liner.one_line(tag="TEST", tag_data="TESTING PRINT", to_reset_data=True)
Example
WithOut Color
from py_oneliner import one_liner
Stages = ["Start", "Middle", "End"]
for s in Stages:
one_liner.one_line(tag="TEST", tag_data="TESTING PRINT", to_reset_data=True)
for i, j1 in enumerate(2 * [1]):
one_liner.one_line("first_loop", f"{i + 1}/{2}")
for i, j1 in enumerate(3 * [1]):
one_liner.one_line(
"second_loop", f"{i + 1}/{3}"
)
for x, y in enumerate(2 * [1]):
one_liner.one_line(
"second_loop_nested_1",
f"{x + 1}/{2}",
)
With Color
from py_oneliner import one_liner
Stages = ["Start", "Middle", "End"]
for s in Stages:
one_liner.one_line(tag="TEST", tag_data="TESTING PRINT", to_reset_data=True)
for i, j1 in enumerate(2 * [1]):
one_liner.one_line("first_loop", f"{i + 1}/{2}", tag_color="red", tag_data_color="green")
for i, j1 in enumerate(3 * [1]):
one_liner.one_line(
"second_loop", f"{i + 1}/{3}", tag_color="yellow", tag_data_color="grey"
)
for x, y in enumerate(2 * [1]):
one_liner.one_line(
"second_loop_nested_1",
f"{x + 1}/{2}",
tag_color="magenta",
tag_data_color="cyan"
)
Metadata
Release files for py-oneliner 0.0.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 |
|---|---|---|---|---|
| py_oneliner-0.0.1.tar.gz | 3.6 kB | Without provenance | Details for py_oneliner-0.0.1.tar.gz |
Release files / py_oneliner-0.0.1.tar.gz
| Download URL | py_oneliner-0.0.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2be3c45b94c9005690460c63e821ead7b9e5e9164fb31892b448bb7429bc719f
|
|
BLAKE2b-256 checksum How to use checksums |
32dce2d7add8452c810b1d308f24edfcaf2b4750cd35b6a5e75fd6adde014534
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9
|
Security for py-oneliner 0.0.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.