A Python package for displaying various loading animations in the terminal.
Project description
Flickpy 3.0.0
Flickpy is a Python package that provides various terminal loading animations. You can use it both from the command line and as a library within your Python code. It supports multiple types of animations, duration-based control, and time format parsing (seconds, minutes, and hours).
Installation
To install the Flickpy package, you can use pip:
pip install flickpy
Command-Line Usage
List Available Animations
To list all the available animations in the package, use the following command:
flickpy list
This will display all the loading animations you can use with the flickpy run command.
Run a Specific Animation
You can run any of the available animations by specifying its name. You also need to provide the duration for how long the animation should run. The duration can be in seconds (10s), minutes (5m), or hours (1h).
flickpy run "<animation_name>" --duration <duration>
For example:
- Run the "Progress Bar Fill" animation for 10 seconds:
flickpy run "Progress Bar Fill" --duration 10s
- Run the "Rotating Bar" animation for 5 minutes:
flickpy run "Rotating Bar" --duration 5m
- Run the "Pulse Blocks" animation for 1 hour:
flickpy run "Pulse Blocks" --duration 1h
If you do not specify a duration, it will default to 10s (10 seconds).
Animation Options
The flickpy run command supports a variety of animations. Here are the available ones:
- Progress Bar Fill
- Rotating Bar
- Expanding Blocks
- Bouncing Bar
- Sliding Dots
- Pulse Blocks
- Loading Wave
- Blinking Blocks
You can list these animations with the flickpy list command.
Import Usage
You can also use Flickpy within your Python code. Here’s an example:
Example: List Animations and Run an Animation
from Flickpy import run_animation, list_animations
# Print all available animations
print("Available Animations:")
for anim in list_animations():
print(anim)
# Run a specific animation for a set duration
run_animation("Progress Bar Fill", "10s")
Example Output
When you run the above Python code, it will:
- Print a list of available animations.
- Run the "Progress Bar Fill" animation for 10 seconds.
Time-Based Control
Time Format Support
The --duration argument accepts the following time formats:
- Seconds: Use
s(e.g.,10sfor 10 seconds) - Minutes: Use
m(e.g.,5mfor 5 minutes) - Hours: Use
h(e.g.,1hfor 1 hour)
Examples:
- 10 seconds:
10s - 5 minutes:
5m - 1 hour:
1h
Example of Using in CLI
# List all available animations
flickpy list
# Run "Progress Bar Fill" animation for 10 seconds
flickpy run "Progress Bar Fill" --duration 10s
# Run "Rotating Bar" animation for 2 minutes
flickpy run "Rotating Bar" --duration 2m
# Run "Pulse Blocks" animation for 1 hour
flickpy run "Pulse Blocks" --duration 1h
Animations in Flickpy
Here’s a list of animations that you can use with Flickpy:
- Progress Bar Fill
- Rotating Bar
- Expanding Blocks
- Bouncing Bar
- Sliding Dots
- Pulse Blocks
- Loading Wave
- Blinking Blocks
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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 flickpy-3.0.0.tar.gz.
File metadata
- Download URL: flickpy-3.0.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06eda98a6029145f39d1b948ca0cfc00f8168cfacf3b92e307e9e20663cc12a3
|
|
| MD5 |
85bbacb4d2e2f92c1b5b9e6f5cb69e47
|
|
| BLAKE2b-256 |
3963ae4808395f0ab9e1c29ff7282cda8e97007aa5765fa8c9a1d70c67ce3cbb
|
File details
Details for the file flickpy-3.0.0-py3-none-any.whl.
File metadata
- Download URL: flickpy-3.0.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d994e41202340c0c27c3ef603f4eef3d98e01a93f44e60d2adaf24630fe401fe
|
|
| MD5 |
80e62eda114dc4793e973c3397e9daa1
|
|
| BLAKE2b-256 |
983159a3e694670f88b3bbf43dea5e9b0ef770b521ebdf347774cc3f89aa2690
|