Skip to main content

curses based interactive value input

Project description

Interactive input


install package

Install by pip

pip install interactive_input


  1. Import and instantiate.
  2. regist keys,messages,hook functions
  3. Call Ask(), it return key-value pair with value by user input.
  4. If call Ask() more than once, object save previous input. so it can request only the increased.
  5. You can overwrite value data with overwrite=True option.
import interactive_input as iin

def main():
    var iinObj = iin.Object()
    iinObj.AddQ("key2", message="Please Input", hook=base64enc)

    # this will delete value of "key1". (not delete key)
    iinObj.AddQ("key1", message="Overwrited", overwrite=True)

def base64enc(v: str) -> str:
    # you can something for user input. (e.g. hashing, encoding)
    return "encoded: " + v

Run and Using

Ask() will present input UI like below.

Key1: _
Please Input

Can move allow-key or jkl. h function as [BACKSPACE]. (can use BS normally as well) [ENTER] can move next value. If hit [ENTER] with last line, Decide values and go next step.


  • Can't use non ascii character. it will broken data.
  • Not support very narrow console.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for interactive-input, version 0.6.1
Filename, size File type Python version Upload date Hashes
Filename, size interactive_input-0.6.1-py3-none-any.whl (9.0 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page