Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/era-net/clipyload
CLIPY - The non blocking python command line loader!
https://github.com/era-net/clipyload
Last synced: 27 days ago
JSON representation
CLIPY - The non blocking python command line loader!
- Host: GitHub
- URL: https://github.com/era-net/clipyload
- Owner: era-net
- License: mit
- Created: 2024-08-22T02:29:35.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-08-22T04:56:01.000Z (3 months ago)
- Last Synced: 2024-10-09T13:10:48.324Z (about 1 month ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CLIPYLOAD
**CLIPY** - The non-blocking python command line loader!**Key Features**:
- CLIPY uses built in python modules
- Simple/straightforward usage
- Fast implementationThanks to [**sindresorhus**](https://github.com/sindresorhus) for providing loads of [**spinners**](https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json) !
# Installation
```bash
git clone https://github.com/era-net/clipyload.git
```# Usage
There is just one main function called **`load`**() as shown in the [basic example](#basic). For more details see [The load() function](#the-load-function).## Basic
```python
import clipyload as clipy
import timedef task():
# simulating some work ...
for _ in range(5):
time.sleep(.8)clipy.load(target=task, desc='working ...')
```Output:
```
โฃท working ...
```## Change the spinner
```python
clipy.load(task, desc='working ...', index='moon')
```Output:
```
๐ working ...
```Choose a [different spinner](#spinners)!
## Move the spinner to the back
```python
clipy.load(task, desc='working', pos='end')
```Output:
```
working โฃท
```Keep on reading to see all the available parameters for the **`load`**() function.
# The load() function
**Parameters**:**`target`**, *function* required
โCallback to a existing function.
**`desc`**, *string* default: empty string ""
โDescription of the loading process.
**`pos`**, *string* default: "start"
โWhere to put the spinner. Either "start" or "end".
**`index`**, *string* default: "dots2"
โIndex of the desired [spinner](#spinners).
**`args`**, *tuple* default: ()
โTo pass arguments to the callback (target) function.
# Spinners
```
index: "dots" ['โ ', 'โ ', 'โ น' ...]index: "dots2" ['โฃพ', 'โฃฝ', 'โฃป' ...]
index: "dots3" ['โ ', 'โ ', 'โ ' ...]
index: "dots4" ['โ ', 'โ ', 'โ ' ...]
index: "dots5" ['โ ', 'โ ', 'โ ' ...]
index: "dots6" ['โ ', 'โ ', 'โ ' ...]
index: "dots7" ['โ ', 'โ ', 'โ ' ...]
index: "dots8" ['โ ', 'โ ', 'โ ' ...]
index: "dots9" ['โขน', 'โขบ', 'โขผ' ...]
index: "dots10" ['โข', 'โข', 'โข' ...]
index: "dots11" ['โ ', 'โ ', 'โ ' ...]
index: "dots12" ['โขโ ', 'โกโ ', 'โ โ ' ...]
index: "dots13" ['โฃผ', 'โฃน', 'โขป' ...]
index: "dots14" ['โ โ ', 'โ โ ', 'โ โ น' ...]
index: "dots8Bit" ['โ ', 'โ ', 'โ ' ...]
index: "sand" ['โ ', 'โ ', 'โ ' ...]
index: "line" ['-', '\\', '|', '/']
index: "line2" ['โ ', '-', 'โ' ...]
index: "pipe" ['โค', 'โ', 'โด' ...]
index: "simpleDots" ['. ', '.. ', '...', ' ']
index: "simpleDotsScrolling" ['. ', '.. ', '...' ...]
index: "star" ['โถ', 'โธ', 'โน' ...]
index: "star2" ['+', 'x', '*']
index: "flip" ['_', '_', '_' ...]
index: "hamburger" ['โฑ', 'โฒ', 'โด']
index: "growVertical" ['โ', 'โ', 'โ' ...]
index: "growHorizontal" ['โ', 'โ', 'โ' ...]
index: "balloon" [' ', '.', 'o' ...]
index: "balloon2" ['.', 'o', 'O' ...]
index: "noise" ['โ', 'โ', 'โ']
index: "bounce" ['โ ', 'โ ', 'โ ', 'โ ']
index: "boxBounce" ['โ', 'โ', 'โ', 'โ']
index: "boxBounce2" ['โ', 'โ', 'โ', 'โ']
index: "triangle" ['โข', 'โฃ', 'โค', 'โฅ']
index: "binary" ['010010', '001100', '100101' ...]
index: "arc" ['โ', 'โ ', 'โ' ...]
index: "circle" ['โก', 'โ', 'โ ']
index: "squareCorners" ['โฐ', 'โณ', 'โฒ', 'โฑ']
index: "circleQuarters" ['โด', 'โท', 'โถ', 'โต']
index: "circleHalves" ['โ', 'โ', 'โ', 'โ']
index: "squish" ['โซ', 'โช']
index: "toggle" ['โถ', 'โท']
index: "toggle2" ['โซ', 'โช']
index: "toggle3" ['โก', 'โ ']
index: "toggle4" ['โ ', 'โก', 'โช', 'โซ']
index: "toggle5" ['โฎ', 'โฏ']
index: "toggle6" ['แ', 'แ']
index: "toggle7" ['โฆพ', 'โฆฟ']
index: "toggle8" ['โ', 'โ']
index: "toggle9" ['โ', 'โ']
index: "toggle10" ['ใ', 'ใ', 'ใ']
index: "toggle11" ['โง', 'โง']
index: "toggle12" ['โ', 'โ']
index: "toggle13" ['=', '*', '-']
index: "arrow" ['โ', 'โ', 'โ' ...]
index: "arrow2" ['โฌ๏ธ ', 'โ๏ธ ', 'โก๏ธ ' ...]
index: "arrow3" ['โนโนโนโนโน', 'โธโนโนโนโน', 'โนโธโนโนโน' ...]
index: "bouncingBar" ['[ ', '[= ', '[== ' ...]
index: "bouncingBall" ['( โ )', '( โ )', '( โ )' ...]
index: "smiley" ['๐ ', '๐ ']
index: "monkey" ['๐ ', '๐ ', '๐ ', '๐ ']
index: "hearts" ['๐ ', '๐ ', '๐ ' ...]
index: "clock" ['๐ ', '๐ ', '๐ ' ...]
index: "earth" ['๐ ', '๐ ', '๐ ']
index: "material" ['โโโโโโโโโโโโโโโโโโโโ', 'โโโโโโโโโโโโโโโโโโโโ', 'โโโโโโโโโโโโโโโโโโโโ' ...]
index: "moon" ['๐ ', '๐ ', '๐ ' ...]
index: "runner" ['๐ถ ', '๐ ']
index: "pong" ['โโ โ', 'โโ โ', 'โ โ โ' ...]
index: "shark" ['โ|\\____________โ', 'โ_|\\___________โ', 'โ__|\\__________โ' ...]
index: "dqpb" ['d', 'q', 'p', 'b']
index: "weather" ['โ๏ธ ', 'โ๏ธ ', 'โ๏ธ ' ...]
index: "christmas" ['๐ฒ', '๐']
index: "grenade" ['ุ ', 'โฒ ', ' ยด ' ...]
index: "point" ['โโโ', 'โโโ', 'โโโ' ...]
index: "layer" ['-', '=', 'โก']
index: "betaWave" ['ฯฮฒฮฒฮฒฮฒฮฒฮฒ', 'ฮฒฯฮฒฮฒฮฒฮฒฮฒ', 'ฮฒฮฒฯฮฒฮฒฮฒฮฒ' ...]
index: "fingerDance" ['๐ค ', '๐ค ', '๐ ' ...]
index: "fistBump" ['๐ค\u3000\u3000\u3000\u3000๐ค ', '๐ค\u3000\u3000\u3000\u3000๐ค ', '๐ค\u3000\u3000\u3000\u3000๐ค ' ...]
index: "soccerHeader" [' ๐งโฝ๏ธ ๐ง ', '๐ง โฝ๏ธ ๐ง ', '๐ง โฝ๏ธ ๐ง ' ...]
index: "mindblown" ['๐ ', '๐ ', '๐ฎ ' ...]
index: "speaker" ['๐ ', '๐ ', '๐ ', '๐ ']
index: "orangePulse" ['๐ธ ', '๐ถ ', '๐ ' ...]
index: "bluePulse" ['๐น ', '๐ท ', '๐ต ' ...]
index: "orangeBluePulse" ['๐ธ ', '๐ถ ', '๐ ' ...]
index: "timeTravel" ['๐ ', '๐ ', '๐ ' ...]
index: "aesthetic" ['โฐโฑโฑโฑโฑโฑโฑ', 'โฐโฐโฑโฑโฑโฑโฑ', 'โฐโฐโฐโฑโฑโฑโฑ' ...]
index: "dwarfFortress" [' โโโโโโยฃยฃยฃ ', 'โบโโโโโโยฃยฃยฃ ', 'โบโโโโโโยฃยฃยฃ ' ...]
```