Skip to main content

Terminal Widgets.

Project description

Twidge

Simple terminal widgets for simple people.

This package is mostly intended for my own personal use, but have at it.

Quick Start

Install

python -m pip install twidge

CLI

# Echo keypresses
python -m twidge echo

# ... as bytes
python -m twidge echobytes

# Edit text
python -m twidge edit 'Hello World'

# Form input
python -m twidge form name,email,username,password

# Template input
python -m twidge template "Hello, my name is {name} and I live in {town}. I prefer {language:('Python', 'JavaScript')}"

Python

from twidge.widgets import *

# Echo keypresses
Echo().run()

# ... as bytes
EchoBytes().run()

# Edit strings
content = Close(EditString('Hello World!')).run()

# Form input
user_info = Close(Form(['Name', 'EMail', 'Username', 'Password'])).run()

# Template input
result = Close(EditTemplate("Hello, my name is {name} and I live in {town}. I prefer {language:('Python', 'JavaScript')}")).run()

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

twidge-1.2.2.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twidge-1.2.2-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file twidge-1.2.2.tar.gz.

File metadata

  • Download URL: twidge-1.2.2.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for twidge-1.2.2.tar.gz
Algorithm Hash digest
SHA256 113e0cc3ab7372047ecd05fd95f19af2da5fed4f29296fd31b4172b811fb327c
MD5 d8891e33a08765ccab3ddfa9015a42a0
BLAKE2b-256 5ce3ecd7b48fe694bceec2c542d989eee1d5a86e87836dac881c2503ed70eb23

See more details on using hashes here.

File details

Details for the file twidge-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: twidge-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for twidge-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1fc1edcb44b0814b5155e1ca3bb622a7fd050ca8e82e58ed8fc479044fd5a44
MD5 992c88d7a34c38c6245938a07a054aa2
BLAKE2b-256 8736d32d62fa9540a088418740c7996401baf12074d9f397cf5a5bd6e4d88f1a

See more details on using hashes here.

Supported by

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