{"id":27654,"library":"click-prompt","title":"click-prompt","description":"Click-prompt provides enhanced interactive prompts for the Click library, offering styled input, confirmation, and selection prompts with color and validation. Current version 0.7.1, released March 2024, with occasional updates.","status":"active","version":"0.7.1","language":"python","source_language":"en","source_url":"https://github.com/click-contrib/click-prompt","tags":["click","prompt","cli","interactive"],"install":[{"cmd":"pip install click-prompt","lang":"bash","label":"default"}],"dependencies":[],"imports":[{"note":"click-prompt is a separate package; its module is 'click_prompt'.","wrong":"from click.prompt import Prompt","symbol":"Prompt","correct":"from click_prompt import Prompt"}],"quickstart":{"code":"from click_prompt import Prompt\n\nname = Prompt('Enter your name', default='World').ask()\nprint(f'Hello, {name}!')","lang":"python","description":"Basic usage: create a Prompt instance and call .ask() to get input."},"warnings":[{"fix":"Use 'from click_prompt import Prompt'.","message":"The Prompt class is not imported from 'click'. It must be imported from 'click_prompt'.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'Prompt(...).ask()' instead of 'prompt(...)'.","message":"In version 0.6.0, the API changed: 'prompt()' function was replaced by the 'Prompt' class. Old code using 'prompt()' will break.","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"Install both: 'pip install click click-prompt'.","message":"If click is not installed, importing click_prompt will raise an ImportError because click is a dependency.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from click_prompt import Prompt'.","cause":"Trying to import Prompt from the wrong module (click instead of click_prompt).","error":"ImportError: cannot import name 'Prompt' from 'click'"},{"fix":"Use the new class-based API: Prompt(...).ask() or from click_prompt import prompt if using older version.","cause":"Using the old function-style API (prompt()) which was removed after version 0.5.x.","error":"NameError: name 'prompt' is not defined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}