Skip to main content

Wrapper for GUM

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

GUMX

An over-engineered Python lib for Gum.

pip install gumx

Binary management

The Gum binary is automatically installed from the original Gum repository when launching the module.

  • You can see the location of the binary with the gumx command.
  • If you want to specify a custom binary, use gumx --set path/to/gum.

Usage

This is quickstart guide. See the See the Gum tutorial for advanced info. All functions and arguments have type hints ease of use.

# Import library (Gum is automatically installed on first run here)
import gumx

# Pick item(s) in a list
response = gumx.choose(['blue', 'red', 'green'], header = 'Favorite color?')

# Confirm an actiono
assert gumx.confirm('Are you sure?', default = False)

# Select a file from a tree
file = gumx.file('.', style = {'height': 5})

# Prompt the user
password = gumx.input(prompt = 'Enter the password', password = True)

# Display a long file
gumx.pager('LICENSE')

# Make a fuzzy search
number = gumx.search(
    list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
    prompt = 'Whats your favorite letter?'
)

# Display a spinner
with gumx.spin():
    # Do a long task
    time.sleep(5)

# Prompt the user (multiple lines)
desc = gumx.write(header = 'Commit description', char_limit = 72)

TODO

  • Implement the gum style command
  • Fix gumx.spin
  • Optimize gumx.pager
  • Test binary installer on all platforms

LICENSE

GUMX is licensed under the MIT license. See the LICENSE file.

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

gumx-0.2.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

gumx-0.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file gumx-0.2.tar.gz.

File metadata

  • Download URL: gumx-0.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for gumx-0.2.tar.gz
Algorithm Hash digest
SHA256 8a6ffc43612ec96e7ef99b3e07fd68c73f38aaf7e48a6c2cbdeef100570ec617
MD5 94bdbd098718009cd07ef099014490c6
BLAKE2b-256 7547ecada9ec69ef57bd2ec157b50f632bd8be50b28b09cfa0a7bb53e3db5345

See more details on using hashes here.

File details

Details for the file gumx-0.2-py3-none-any.whl.

File metadata

  • Download URL: gumx-0.2-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for gumx-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 700961a4a276575b1868284d1385088caa97374737c595466bae2cbb1a8e9d04
MD5 075e9d330e252d44d0a4d1d0bcb0deab
BLAKE2b-256 32ac5501e2c06acde0d8023559ffaa169fc45807867ad0d0845614765ee1ff05

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