PromptInput 0.7

Creator: railscoder56

Last updated:

Add to Cart

Description:

PromptInput 0.7

PromptInput
Take command line input using Prompt
PromptInput is a python library built on top of "argparse".It allows you to ask for inputs from user with the relevant help text whenever you miss to pass that input with command.
Features

You don't need to worry about remembering the order of input anymore.
PromptInput will ask for any input that you miss.
By passing the default value you can also make an argument optional.

Tech
PromptInput just uses built in argparse module of python and do not have any other dependency.
And of course Dillinger itself is open source with a public repository
on GitHub.
Installation
Dillinger requires Python v3.6+ to run.
Install the library using pip.
pip install PromptInput

Usage
Import PromptInput in your script.
from PromptInput import PromptInput

Make an object of PromptInput class.
parser = PromptInput()

Call add_argument method and pass all these arguments accoring to usage.
parser.add_argument('var1', type=str, nargs='?',
help='Enter var 1',default = "demo",count = 1,required = True)

count
It is passed with every argument to specify the position of a particular argument. It is used to later prompt the help for the correct input.
required
It is only passed if the argument is required and there is no default value present and you want the user to input it in case it is left blank with command.
Calling parse_args method to get a namespace containing all the arguments
args = parser.parse_args()
print(args.var1)

License
MIT
Free Software, Hell Yeah!

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.