{"id":13592725,"url":"https://github.com/magmax/python-inquirer","last_synced_at":"2025-05-13T18:12:13.273Z","repository":{"id":16617218,"uuid":"19372146","full_name":"magmax/python-inquirer","owner":"magmax","description":"A collection of common interactive command line user interfaces, based on Inquirer.js (https://github.com/SBoudrias/Inquirer.js/)","archived":false,"fork":false,"pushed_at":"2025-05-09T12:39:19.000Z","size":1539,"stargazers_count":1072,"open_issues_count":40,"forks_count":100,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-09T22:41:37.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-05-02T10:23:43.000Z","updated_at":"2025-05-08T15:25:51.000Z","dependencies_parsed_at":"2024-02-04T00:25:48.322Z","dependency_job_id":"daef500a-968b-4a53-92c3-df96f30f0b69","html_url":"https://github.com/magmax/python-inquirer","commit_stats":{"total_commits":709,"total_committers":43,"mean_commits":"16.488372093023255","dds":0.6530324400564175,"last_synced_commit":"c10cf48078594885355ad0c4b9f70fbd90664d4c"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmax%2Fpython-inquirer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmax%2Fpython-inquirer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmax%2Fpython-inquirer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmax%2Fpython-inquirer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magmax","download_url":"https://codeload.github.com/magmax/python-inquirer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000857,"owners_count":21997442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:01:12.470Z","updated_at":"2025-05-13T18:12:13.214Z","avatar_url":"https://github.com/magmax.png","language":"Python","readme":"[![PyPI](https://img.shields.io/pypi/v/inquirer.svg)][pypi status]\n[![Status](https://img.shields.io/pypi/status/inquirer.svg)][pypi status]\n[![Python Version](https://img.shields.io/pypi/pyversions/inquirer)][pypi status]\n[![License](https://img.shields.io/pypi/l/inquirer)][license]\n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]\n\u003cbr\u003e\n[![Read the documentation at https://python-inquirer.readthedocs.io/](https://img.shields.io/readthedocs/python-inquirer/latest.svg?label=Read%20the%20Docs)][read the docs]\n[![Tests](https://github.com/magmax/python-inquirer/workflows/Tests/badge.svg)][tests]\n[![Codecov](https://codecov.io/gh/magmax/python-inquirer/branch/main/graph/badge.svg)][codecov]\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)][pre-commit]\n\n[pypi status]: https://pypi.org/project/inquirer/\n[read the docs]: https://python-inquirer.readthedocs.io/\n[tests]: https://github.com/magmax/python-inquirer/actions?workflow=Tests\n[codecov]: https://app.codecov.io/gh/magmax/python-inquirer\n[pre-commit]: https://github.com/pre-commit/pre-commit\n[black]: https://github.com/psf/black\n\n# python-inquirer\n\nCollection of common interactive command line user interfaces, based on [Inquirer.js].\n\n## Goal and Philosophy\n\nBorn as a [Inquirer.js] clone, it shares part of the goals and philosophy.\n\nSo, **Inquirer** should ease the process of asking end user **questions**, **parsing**, **validating** answers, managing **hierarchical prompts** and providing **error feedback**.\n\nYou can [download the python-inquirer code from GitHub] or [download the wheel from Pypi].\n\n### Platforms support\n\nPython-inquirer supports mainly UNIX-based platforms (eq. Mac OS, Linux, etc.). Windows has experimental support, please let us know if there are any problems!\n\n## Installation\n\n```sh\npip install inquirer\n```\n\n## Documentation\n\nDocumentation has been moved to [python-inquirer.readthedocs.io](https://python-inquirer.readthedocs.io/).\n\nBut here you have a couple of usage examples:\n\n### Text\n\n```python\nimport re\n\nimport inquirer\nquestions = [\n  inquirer.Text('name', message=\"What's your name\"),\n  inquirer.Text('surname', message=\"What's your surname\"),\n  inquirer.Text('phone', message=\"What's your phone number\",\n                validate=lambda _, x: re.match('\\+?\\d[\\d ]+\\d', x),\n                )\n]\nanswers = inquirer.prompt(questions)\n```\n\n### Editor\n\nLike a Text question, but used for larger answers. It opens external text editor which is used to collect the answer.\n\nThe environment variables `$VISUAL` and `$EDITOR`, can be used to specify which editor should be used. If not present inquirer fallbacks to `vim -\u003e emacs -\u003e nano` in this order based on availability in the system.\n\nExternal editor handling is done using great library [python-editor](https://github.com/fmoo/python-editor).\n\nExample:\n\n```python\nimport inquirer\nquestions = [\n  inquirer.Editor('long_text', message=\"Provide long text\")\n]\nanswers = inquirer.prompt(questions)\n```\n\n### List\n\nShows a list of choices, and allows the selection of one of them.\n\nExample:\n\n```python\nimport inquirer\nquestions = [\n  inquirer.List('size',\n                message=\"What size do you need?\",\n                choices=['Jumbo', 'Large', 'Standard', 'Medium', 'Small', 'Micro'],\n            ),\n]\nanswers = inquirer.prompt(questions)\n```\n\nList questions can take one extra argument `carousel=False`. If set to true, the answers will rotate (back to first when pressing down on last choice, and down to last choice when pressing up on first choice)\n\n### Checkbox\n\nShows a list of choices, with multiple selection.\n\nExample:\n\n```python\nimport inquirer\nquestions = [\n  inquirer.Checkbox('interests',\n                    message=\"What are you interested in?\",\n                    choices=['Computers', 'Books', 'Science', 'Nature', 'Fantasy', 'History'],\n                    ),\n]\nanswers = inquirer.prompt(questions)\n```\n\nCheckbox questions can take extra argument `carousel=False`. If set to true, the answers will rotate (back to first when pressing down on last choice, and down to last choice when pressing up on first choice)\n\nAnother argument that can be used is `locked=\u003cList\u003e`. The given choices in the locked argument cannot be removed. This is useful if you want to make clear that a specific option out of the choices must be chosen.\n\n### Path\n\nLike Text question, but with builtin validations for working with paths.\n\nExample:\n\n```python\nimport inquirer\nquestions = [\n  inquirer.Path('log_file',\n                 message=\"Where logs should be located?\",\n                 path_type=inquirer.Path.DIRECTORY,\n                ),\n]\nanswers = inquirer.prompt(questions)\n```\n\n## Contributing\n\nContributions are very welcome.\nTo learn more, see the [Contributor Guide].\n\n## License\n\nCopyright (c) 2014-2023 Miguel Ángel García ([@magmax_en]), based on [Inquirer.js], by Simon Boudrias ([@vaxilart])\n\nDistributed under the terms of the [MIT license][license].\n\n\u003c!-- github-only --\u003e\n\n[license]: https://github.com/magmax/python-inquirer/blob/main/LICENSE\n[@magmax_en]: https://twitter.com/magmax_en\n[@vaxilart]: https://twitter.com/vaxilart\n[contributor guide]: CONTRIBUTING.md\n[download the python-inquirer code from github]: https://github.com/magmax/python-inquirer\n[download the wheel from pypi]: https://pypi.python.org/pypi/inquirer\n[examples/]: https://github.com/magmax/python-inquirer/tree/master/examples\n[inquirer.js]: https://github.com/SBoudrias/Inquirer.js\n","funding_links":[],"categories":["Python","📚 فهرست","Python 🐍"],"sub_categories":["کتابخانه هاي TUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagmax%2Fpython-inquirer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagmax%2Fpython-inquirer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagmax%2Fpython-inquirer/lists"}