Package: inquirerpy
InquirerPyDocumentation:inquirerpy.readthedocs.ioIntroductionInquirerPyis a Python port of the famousInquirer.js(A collection of common interactive command line user interfaces).
This project is a re-implementation of thePyInquirerproject, with bug fixes of known issues, new prompts, backward compatible APIs
as well as more customisation options.MotivationPyInquireris a great Python port ofInquirer.js, however, the project is slowly reaching
to an unmaintained state with various issues left behind and no intention to implement more feature requests. I was heavily relying on this library for other projects but
could not proceed due to the limitations.Some noticeable ones that bother me the most:hard limit onprompt_toolkitversion 1.0.3various color issuesvarious cursor issuesNo options for VI/Emacs navigation key bindingsPagination option doesn't workThis project uses python3.7+ type hinting with focus on resolving above issues while providing greater customisation options.RequirementsOSLeveragingprompt_toolkit,InquirerPyworks cross platform for all OS. Although Unix platform may have a better experience than Windows.Pythonpython >= 3.7Getting StartedCheckout full documentationhere.Installpip3installInquirerPyQuick StartClassic Syntax (PyInquirer)fromInquirerPyimportpromptquestions=[{"type":"input","message":"What's your name:","name":"name"},{"type":"confirm","message":"Confirm?","name":"confirm"},]result=prompt(questions)name=result["name"]confirm=result["confirm"]Alternate SyntaxfromInquirerPyimportinquirername=inquirer.text(message="What's your name:").execute()confirm=inquirer.confirm(message="Confirm?").execute()Migrating from PyInquirerMost APIs fromPyInquirershould be compatible withInquirerPy. If you have discovered more incompatible APIs, please
create an issue or directly update README via a pull request.EditorPromptInquirerPydoes not supporteditorprompt as of now.CheckboxPromptThe following table contains the mapping of incompatible parameters.PyInquirerInquirerPypointer_signpointerselected_signenabled_symbolunselected_signdisabled_symbolStyleEvery style keys fromPyInquireris present inInquirerPyexcept the ones in the following table.PyInquirerInquirerPyselectedpointerAlthoughInquirerPysupport all the keys fromPyInquirer, the styling works slightly different.
Please refer to theStyledocumentation for detailed information.Similar projectsquestionaryquestionaryis a fantastic fork which supportsprompt_toolkit3.0.0+ with performance improvement and more customisation options.
It's already a well established and stable library.Comparing withquestionary,InquirerPyoffers even more customisation options in styles, UI as well as key bindings.InquirerPyalso provides a new
and powerfulfuzzyprompt.python-inquirerpython-inquireris another great Python port ofInquirer.js. Instead of usingprompt_toolkit, it
leverages the libraryblessedto implement the UI.Before implementingInquirerPy, this library came up as an alternative. It's a more stable library comparing to the originalPyInquirer, however
it has a rather limited customisation options and an older UI which did not solve the issues I was facing described in theMotivationsection.Comparing withpython-inquirer,InquirerPyoffers a slightly better UI,
more customisation options in key bindings and styles, providing pagination as well as more prompts.CreditThis project is based on the great work done by the following projects & their authors.PyInquirerprompt_toolkitLicenseThis project is licensed underMIT.