Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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!

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 implementation

Thanks 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 time

def 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" [' โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆยฃยฃยฃ ', 'โ˜บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆยฃยฃยฃ ', 'โ˜บโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆยฃยฃยฃ ' ...]
```