A simple CLI helper for python
Project description
Terminarty
A simple CLI helper for Python
Installation
pip install terminarty
Features
Inputs
from terminarty import Terminal
terminal = Terminal()
name = terminal.input("What is your name?")
Choises
from terminarty import Terminal
terminal = Terminal()
choise = terminal.choise("What is your favorite color?", ["red", "green", "blue"])
if choise == "green":
print("I like green too!")
else:
print("Ok.")
Text Boxes
from terminarty import Box, BoxStyles
print(Box("Hello World", BoxStyles.Ascii))
There are several box styles available:
Ascii:
+───────────+
│Hello World│
+───────────+
Thin:
┌───────────┐
│Hello World│
└───────────┘
Thick:
┏━━━━━━━━━━━┓
┃Hello World┃
┗━━━━━━━━━━━┛
Double:
╔═══════════╗
║Hello World║
╚═══════════╝
Round:
╭───────────╮
│Hello World│
╰───────────╯
Waitings
from terminarty import Waiting
import time
with Waiting("Loading"): # "Loading..." would work the same
time.sleep(5)
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
terminarty-0.0.5.tar.gz
(4.7 kB
view details)
File details
Details for the file terminarty-0.0.5.tar.gz
.
File metadata
- Download URL: terminarty-0.0.5.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 744fe34145825b396af2a7098088d88736c5e1d71de541365686a62c07022e7f |
|
MD5 | d7a8bf041976c1bbf05fbab718673012 |
|
BLAKE2b-256 | 2481f8f995d8049d228f62489adfe02520d54f845dd03651f1bdf9bfd87ad1e4 |