{"id":2073,"library":"inquirerpy","title":"InquirerPy","description":"InquirerPy is a Python port of the famous Inquirer.js, offering a collection of common interactive command-line user interfaces. It is a re-implementation of the PyInquirer project, focusing on bug fixes, new prompts, backward-compatible APIs, and enhanced customization. Currently at version 0.3.4, the library maintains an active development and release cadence.","status":"active","version":"0.3.4","language":"en","source_language":"en","source_url":"https://github.com/kazhala/InquirerPy","tags":["cli","interactive","prompt","terminal","ui"],"install":[{"cmd":"pip install InquirerPy","lang":"bash","label":"Install InquirerPy"}],"dependencies":[{"reason":"Core dependency for interactive terminal features.","package":"prompt_toolkit"},{"reason":"Required for fuzzy string matching in relevant prompts.","package":"pfzy"},{"reason":"Only required for running specific examples; not a core library dependency.","package":"boto3","optional":true}],"imports":[{"note":"Recommended 'Alternate Syntax' for direct interaction with prompt classes.","symbol":"inquirer","correct":"from InquirerPy import inquirer"},{"note":"Used for 'Classic Syntax' (PyInquirer compatible), taking a list of questions.","symbol":"prompt","correct":"from InquirerPy import prompt"},{"note":"Validator classes (e.g., NumberValidator, PathValidator) are within the 'validator' submodule.","wrong":"from InquirerPy import Validator","symbol":"Validator","correct":"from InquirerPy.validator import Validator"}],"quickstart":{"code":"from InquirerPy import inquirer\n\nname = inquirer.text(message=\"What's your name:\").execute()\nfav_lang = inquirer.select(\n    message=\"What's your favourite programming language:\",\n    choices=[\"Go\", \"Python\", \"Rust\", \"JavaScript\"],\n).execute()\nconfirm = inquirer.confirm(message=\"Confirm?\").execute()\n\nprint(f\"Hello {name}, your favourite language is {fav_lang}, and you confirmed: {confirm}\")","lang":"python","description":"This quickstart demonstrates the recommended 'Alternate Syntax' to create and execute common interactive prompts like text input, single-choice selection, and confirmation. The `.execute()` method runs the prompt and returns the user's input."},"warnings":[{"fix":"Review the InquirerPy migration guide for specific parameter and style key changes, and replace unsupported prompts with alternative InquirerPy options.","message":"When migrating from PyInquirer, note that 'EditorPrompt' is not supported in InquirerPy. Also, parameters for 'CheckboxPrompt' (e.g., `pointer_sign` changed to `pointer`) and keys for 'Style' (e.g., `selected` changed to `pointer`) have been renamed or altered.","severity":"breaking","affected_versions":"All versions (migration from PyInquirer)"},{"fix":"Pass `raise_keyboard_interrupt=True/False` directly when initializing the prompt (e.g., `inquirer.text(message='...', raise_keyboard_interrupt=True)`).","message":"The `raise_keyboard_interrupt` parameter in the `.execute()` function is slated for deprecation. Its behavior has changed, and the recommended approach is to provide `raise_keyboard_interrupt` as an initialisation option to the prompt class.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"Inspect custom symbol configurations for checkbox, expand, and rawlist prompts and adjust spacing as needed to accommodate the new automatic spacing.","message":"In version 0.3.4, automatic spacing was introduced for checkbox, expand, and rawlist prompts. If you have custom `enabled_symbol` or `disabled_symbol` configurations, you might need to remove any extra spaces you previously added to maintain alignment.","severity":"gotcha","affected_versions":">=0.3.4"},{"fix":"Replace `help_msg` with `expand_help` when configuring the `expand` prompt.","message":"For the `expand` prompt, the `help_msg` parameter has been deprecated in favor of `expand_help` for customising help messages and expansion keys.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"If you require a border for fuzzy prompts, explicitly set `border=True` during prompt initialization.","message":"The default value for the `border` parameter in fuzzy prompts was changed from `True` to `False` in version 0.3.4 to ensure consistency with other prompt types.","severity":"gotcha","affected_versions":">=0.3.4"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}