Skip to main content

A simple CLI helper for python

Project description

Terminarty

A simple CLI helper for Python

License: MIT

Version

Python versions

Downloads

Installation

pip install terminarty

Features

Inputs

from terminarty import Terminal



terminal = Terminal()



name = terminal.input("What is your name?")

"What is yout 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.")

"What is your favorite color?" (red, green, blue)

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)

"Loading..."

Project details


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)

Uploaded Source

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

Hashes for terminarty-0.0.5.tar.gz
Algorithm Hash digest
SHA256 744fe34145825b396af2a7098088d88736c5e1d71de541365686a62c07022e7f
MD5 d7a8bf041976c1bbf05fbab718673012
BLAKE2b-256 2481f8f995d8049d228f62489adfe02520d54f845dd03651f1bdf9bfd87ad1e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page