PRINTYFUL - You CLI application more beatiful!
Developed to improve the user experience in Python terminal applications, seeking simplicity of use and efficiency of applying beautiful decorations and loading screens to your application!
How to use
Printyful is based on execution engines, where each engine has its own responsibility (inheriting executions from other engines) and is included in a final engine called FullMotor. Using this engine it will be possible to create decorated titles, panels, loading screens and other currently available decorations.
Usage example:
from printyful import FullMotor
motor = FullMotor()
title = motor.panel_title('Your life is great')
print(title)
motor.loading_bar(message='Downloading...', sleeptime=0.4 , final_text='100% (COMPLETE)')
Available Motors
1. ColorMotor
Responsible for styling terminal text using ANSI color codes.
| Method | Description |
|---|---|
red_text(text) |
Displays text in red. |
blue_text(text) |
Displays text in blue. |
green_text(text) |
Displays text in green. |
yellow_text(text) |
Displays text in yellow. |
Example:
from printyful import ColorMotor
color = ColorMotor()
print(color.red_text("Error!"))
print(color.green_text("Operation successful!"))
print(color.blue_text("Information"))
print(color.yellow_text("Warning!"))
2. BackgroudColorMotor
Inherits all features from ColorMotor and adds methods for applying background colors to terminal text.
| Method | Description |
|---|---|
red_background(text) |
Applies a red background. |
blue_background(text) |
Applies a blue background. |
green_background(text) |
Applies a green background. |
yellow_text(text) |
Applies a yellow background. |
Example:
from printyful import BackgroudColorMotor
background = BackgroudColorMotor()
print(background.red_background(" ERROR "))
print(background.green_background(" SUCCESS "))
print(background.blue_background(" INFO "))
3. StylesMotor
Inherits the previous motors and introduces additional text formatting options.
| Method | Description |
|---|---|
bold_text(text) |
Makes text bold. |
sublime_text(text) |
Underlines text. |
invert_text(text) |
Inverts text and background colors. |
Example:
from printyful import StylesMotor
styles = StylesMotor()
print(styles.bold_text("Important message"))
print(styles.sublime_text("Underlined text"))
print(styles.invert_text("Inverted text"))
4. PanelMotor
Responsible for creating visual panels and option lists directly in the terminal.
Initialization parameter:
| Parameter | Type | Default | Description |
|---|---|---|---|
title_color |
str |
'0' |
ANSI color code used for panel titles. |
Methods:
| Method | Description |
|---|---|
panel_title(title) |
Creates a visual panel containing a title. Requires at least 8 characters. |
panel_list_options_enumerated(options) |
Generates an automatically numbered option list. |
panel_list_options(options) |
Generates an option list with custom identifiers. |
Example:
from printyful import PanelMotor
panel = PanelMotor(title_color='34')
print(panel.panel_title("PRINTYFUL"))
options = ["Start", "Settings", "Exit"]
print(panel.panel_list_options_enumerated(options))
custom_options = [
("A", "Start"),
("B", "Settings"),
("C", "Exit")
]
print(panel.panel_list_options(custom_options))
5. LoadingMotor
Inherits all previous functionalities and introduces loading animations for terminal applications.
Method: loading_text()
Displays a text-based loading animation using progressively increasing dots.
| Parameter | Type | Default | Description |
|---|---|---|---|
text |
str |
'Loading' |
Text displayed during the animation. |
multiplier |
int |
3 |
Maximum number of dots. |
sleeptime |
float |
0.8 |
Time interval between updates, in seconds. |
await_confirm |
bool |
False |
Waits for user confirmation after completion. |
Example:
from printyful import LoadingMotor
loading = LoadingMotor()
loading.loading_text(
text="Initializing",
multiplier=5,
sleeptime=0.5,
await_confirm=True
)
Method: loading_bar()
Creates a percentage-based loading bar with dynamically changing colors.
| Parameter | Type | Default | Description |
|---|---|---|---|
multiplier |
int |
100 |
Maximum progress value. |
sleeptime |
float |
0.8 |
Time interval between updates. |
colors |
List[str] |
['31', '33', '32'] |
ANSI color codes used by the progress bar. |
await_confirm |
bool |
False |
Waits for user confirmation after completion. |
final_text |
str |
'' |
Additional text displayed beside the progress bar. |
message |
str |
'' |
Message displayed during the loading process. |
Color transitions are determined by the current progress:
- 0%–49%: First color.
- 50%–79%: Second color.
- 80%–100%: Third color.
Example:
from printyful import LoadingMotor
loading = LoadingMotor()
loading.loading_bar(
multiplier=100,
sleeptime=0.05,
colors=['31', '33', '32'],
message="Installing dependencies...",
final_text="Installation",
await_confirm=True
)
6. FullMotor
FullMotor combines all previously introduced motors into a single class.
It is the most complete option in the library, providing access to text colors, background colors, formatting, panels, and loading animations through a single instance.
Initialization parameter:
| Parameter | Type | Default | Description |
|---|---|---|---|
title_color |
str |
'0' |
ANSI color code used for panel titles. |
Example:
from printyful import FullMotor
motor = FullMotor(title_color='34')
# Text colors
print(motor.red_text("Error"))
print(motor.green_text("Success"))
# Background colors
print(motor.blue_background("Information"))
# Text styles
print(motor.bold_text("Important"))
# Panels
print(motor.panel_title("MY APPLICATION"))
# Loading animations
motor.loading_text("Starting", sleeptime=0.3)
Motor Inheritance Structure
Printyful uses an inheritance-based architecture, allowing each motor to reuse and extend the functionalities of its predecessor.
ColorMotor
|
v
BackgroudColorMotor
|
v
StylesMotor
|
v
PanelMotor
|
v
LoadingMotor
|
v
FullMotor
Installation
pip install printyful
Additional Notes
- Colors and text formatting are implemented using ANSI escape sequences.
- Loading animations use
time.sleep()to control animation speed. - Terminal clearing uses the
clearcommand, primarily targeting Linux and Unix environments. - Each motor can be imported and instantiated independently. Using
FullMotoris optional.
Printyful — Make your terminal more expressive.
Metadata
Release files for printyful 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 |
|---|---|---|---|---|
| printyful-1.1.tar.gz | 4.5 kB | Without provenance | Details for printyful-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| printyful-1.1-py3-none-any.whl | Python 3 | none | any | Details for printyful-1.1-py3-none-any.whl |
Total release size: 9.1 kB
Release files / printyful-1.1.tar.gz
| Download URL | printyful-1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
acf4998c39a14e1ecbf8e79fde65b3c66c8e7607319819d0c6f8f324e43e78d9
|
|
BLAKE2b-256 checksum How to use checksums |
370a70893bd9a9bd4494a966639ef143986c79ea5e646ea225534bf3e0239bd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / printyful-1.1-py3-none-any.whl
| Download URL | printyful-1.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92fdcb805a5e9374d8df77675e3585c9aee0060b22755520c1d7c7ec45898c43
|
|
BLAKE2b-256 checksum How to use checksums |
62036b67e98c343de5dab13127575e349ff7a787d4b22fc901fa73a170bbe878
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for printyful 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.