inquirer
A collection of common interactive command line user interfaces, based on Inquirer.js (https://github.com/SBoudrias/Inquirer.js/)
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 38 committers (2.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.8%) to scientific vocabulary
Keywords from Contributors
Repository
A collection of common interactive command line user interfaces, based on Inquirer.js (https://github.com/SBoudrias/Inquirer.js/)
Basic Info
- Host: GitHub
- Owner: magmax
- License: mit
- Language: Python
- Default Branch: main
- Size: 1.67 MB
Statistics
- Stars: 1,099
- Watchers: 8
- Forks: 101
- Open Issues: 39
- Releases: 33
Metadata Files
README.md
python-inquirer
Collection of common interactive command line user interfaces, based on Inquirer.js.
Goal and Philosophy
Born as a Inquirer.js clone, it shares part of the goals and philosophy.
So, Inquirer should ease the process of asking end user questions, parsing, validating answers, managing hierarchical prompts and providing error feedback.
You can download the python-inquirer code from GitHub or download the wheel from Pypi.
Platforms support
Python-inquirer supports mainly UNIX-based platforms (eq. Mac OS, Linux, etc.). Windows has experimental support, please let us know if there are any problems!
Installation
sh
pip install inquirer
Documentation
Documentation has been moved to python-inquirer.readthedocs.io.
But here you have a couple of usage examples:
Text
```python import re
import inquirer questions = [ inquirer.Text('name', message="What's your name"), inquirer.Text('surname', message="What's your surname"), inquirer.Text('phone', message="What's your phone number", validate=lambda _, x: re.match('+?\d[\d ]+\d', x), ) ] answers = inquirer.prompt(questions) ```
Editor
Like a Text question, but used for larger answers. It opens external text editor which is used to collect the answer.
The environment variables $VISUAL and $EDITOR, can be used to specify which editor should be used. If not present inquirer fallbacks to vim -> emacs -> nano in this order based on availability in the system.
External editor handling is done using great library python-editor.
Example:
python
import inquirer
questions = [
inquirer.Editor('long_text', message="Provide long text")
]
answers = inquirer.prompt(questions)
List
Shows a list of choices, and allows the selection of one of them.
Example:
python
import inquirer
questions = [
inquirer.List('size',
message="What size do you need?",
choices=['Jumbo', 'Large', 'Standard', 'Medium', 'Small', 'Micro'],
),
]
answers = inquirer.prompt(questions)
List 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)
Checkbox
Shows a list of choices, with multiple selection.
Example:
python
import inquirer
questions = [
inquirer.Checkbox('interests',
message="What are you interested in?",
choices=['Computers', 'Books', 'Science', 'Nature', 'Fantasy', 'History'],
),
]
answers = inquirer.prompt(questions)
Checkbox 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)
Another argument that can be used is locked=<List>. 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.
Path
Like Text question, but with builtin validations for working with paths.
Example:
python
import inquirer
questions = [
inquirer.Path('log_file',
message="Where logs should be located?",
path_type=inquirer.Path.DIRECTORY,
),
]
answers = inquirer.prompt(questions)
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Copyright (c) 2014-2023 Miguel Ángel García (@magmax_en), based on Inquirer.js, by Simon Boudrias (@vaxilart)
Distributed under the terms of the MIT license.
Owner
- Name: Miguel Ángel García
- Login: magmax
- Kind: user
- Location: Ciudad Real
- Website: https://magmax.org
- Repositories: 137
- Profile: https://github.com/magmax
GitHub Events
Total
- Create event: 30
- Release event: 1
- Issues event: 6
- Watch event: 86
- Delete event: 37
- Issue comment event: 39
- Push event: 49
- Pull request review event: 9
- Pull request review comment event: 12
- Pull request event: 79
- Fork event: 5
Last Year
- Create event: 30
- Release event: 1
- Issues event: 6
- Watch event: 86
- Delete event: 37
- Issue comment event: 39
- Push event: 49
- Pull request review event: 9
- Pull request review comment event: 12
- Pull request event: 79
- Fork event: 5
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Miguel Angel Garcia | m****a@g****m | 249 |
| dependabot[bot] | 4****] | 207 |
| Jan Wille | m****l@j****e | 86 |
| staticdev | s****t@p****m | 52 |
| AuHau | u****a@g****m | 44 |
| William Venner | 1****r | 19 |
| vittorio.camisa@gmail.com | v****a@g****m | 8 |
| NivEz | n****r@g****m | 7 |
| matiboy | m****c@g****m | 6 |
| Matt Warren | m****n@g****m | 5 |
| Zhymabek Roman | 6****n | 5 |
| Steven Loria | s****1@g****m | 3 |
| Rizky Arlin | r****5@g****m | 3 |
| Lele Gaifax | l****e@m****t | 3 |
| Vittorio Camisa | “****o@i****” | 3 |
| Ariel Steiner | a****s@a****m | 2 |
| Aaron Fischer | a****n@s****m | 2 |
| Palash Karmore | p****e@g****m | 2 |
| Patrick Browne | p****e@g****m | 2 |
| Xiang Zheng | z****l@g****m | 2 |
| The Alchemist | k****0@g****m | 2 |
| Yahya Badran | y****n@g****m | 1 |
| Tomer Zait | r****3@g****m | 1 |
| Jose Manuel Rubio | j****o@a****m | 1 |
| Patrick Browne | p****e@a****m | 1 |
| Victor Machado | v****o@h****m | 1 |
| Shintaro Takechi | p****9@g****m | 1 |
| Sandro-Alessio Gierens | s****o@g****e | 1 |
| Robert Stein | S****t | 1 |
| Priyanshu Tripathi | p****u@g****v | 1 |
| and 8 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 59
- Total pull requests: 363
- Average time to close issues: 4 months
- Average time to close pull requests: 24 days
- Total issue authors: 54
- Total pull request authors: 21
- Average comments per issue: 2.92
- Average comments per pull request: 0.64
- Merged pull requests: 208
- Bot issues: 0
- Bot pull requests: 286
Past Year
- Issues: 4
- Pull requests: 80
- Average time to close issues: about 2 months
- Average time to close pull requests: about 2 months
- Issue authors: 4
- Pull request authors: 6
- Average comments per issue: 1.5
- Average comments per pull request: 0.48
- Merged pull requests: 40
- Bot issues: 0
- Bot pull requests: 65
Top Authors
Issue Authors
- Cube707 (4)
- kutysam (2)
- guysalt (2)
- aaronhendry (2)
- gaardhus (1)
- elpekenin (1)
- manorit2001 (1)
- aphshir (1)
- snps-grafael (1)
- JackBailey (1)
- whinee (1)
- sergey-samoylov (1)
- markfink (1)
- adityasule (1)
- Zereges (1)
Pull Request Authors
- dependabot[bot] (378)
- Cube707 (66)
- staticdev (7)
- fullfox (4)
- badranX (4)
- magmax (3)
- guysalt (3)
- YoussefEssalhi (2)
- victormachadoperez (2)
- ocaballeror (2)
- rizkyarlin (2)
- GetPsyched (2)
- polirritmico (2)
- The-Alchemist (2)
- ofeknissan (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 22
-
Total downloads:
- pypi 4,406,238 last-month
- Total docker downloads: 1,477,681
-
Total dependent packages: 283
(may contain duplicates) -
Total dependent repositories: 842
(may contain duplicates) - Total versions: 112
- Total maintainers: 6
pypi.org: inquirer
Collection of common interactive command line user interfaces, based on Inquirer.js
- Homepage: https://github.com/magmax/python-inquirer
- Documentation: https://python-inquirer.readthedocs.io
- License: MIT
-
Latest release: 3.4.1
published 11 months ago
Rankings
Maintainers (3)
alpine-v3.18: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.1.3-r1
published about 3 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-inquirer-pyc
Precompiled Python bytecode for py3-inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.1.3-r1
published about 3 years ago
Rankings
Maintainers (1)
alpine-v3.13: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 2.7.0-r1
published over 5 years ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/magmax/python-inquirer
- Documentation: https://pkg.go.dev/github.com/magmax/python-inquirer#section-documentation
- License: mit
-
Latest release: v3.4.1+incompatible
published 11 months ago
Rankings
alpine-v3.14: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 2.7.0-r2
published about 5 years ago
Rankings
Maintainers (1)
alpine-edge: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.4.1-r0
published 11 months ago
Rankings
Maintainers (1)
alpine-edge: py3-inquirer-pyc
Precompiled Python bytecode for py3-inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.4.1-r0
published 11 months ago
Rankings
Maintainers (1)
alpine-v3.15: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 2.7.0-r2
published about 5 years ago
Rankings
Maintainers (1)
alpine-v3.16: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 2.7.0-r3
published over 4 years ago
Rankings
Maintainers (1)
alpine-v3.17: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.0.0-r0
published over 3 years ago
Rankings
Maintainers (1)
conda-forge.org: inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 2.10.1
published over 3 years ago
Rankings
spack.io: py-inquirer
Collection of common interactive command line user interfaces, based on Inquirer.js.
- Homepage: https://github.com/magmax/python-inquirer
- License: []
-
Latest release: 3.1.3
published over 3 years ago
Rankings
Maintainers (1)
anaconda.org: inquirer
Collection of common interactive command line user interfaces, based on Inquirer.js.
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.1.4
published over 2 years ago
Rankings
alpine-v3.20: py3-inquirer-pyc
Precompiled Python bytecode for py3-inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.2.4-r1
published about 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.2.5-r0
published about 2 years ago
Rankings
Maintainers (1)
alpine-v3.21: py3-inquirer-pyc
Precompiled Python bytecode for py3-inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.2.5-r0
published about 2 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.2.4-r1
published about 2 years ago
Rankings
Maintainers (1)
alpine-v3.19: py3-inquirer-pyc
Precompiled Python bytecode for py3-inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.1.3-r1
published about 3 years ago
Rankings
Maintainers (1)
alpine-v3.21: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.2.5-r0
published about 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-inquirer-pyc
Precompiled Python bytecode for py3-inquirer
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.2.5-r0
published about 2 years ago
Rankings
Maintainers (1)
alpine-v3.19: py3-inquirer
collection of common interactive command line user interfaces
- Homepage: https://github.com/magmax/python-inquirer
- License: MIT
-
Latest release: 3.1.3-r1
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- actions/checkout v3 composite
- crazy-max/ghaction-github-labeler v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- release-drafter/release-drafter v5 composite
- salsify/action-detect-and-tag-new-version v2 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- codecov/codecov-action v3 composite
- furo ==2022.12.7
- myst_parser ==0.18.1
- sphinx ==6.1.2
- alabaster 0.7.12 develop
- babel 2.11.0 develop
- bandit 1.7.4 develop
- beautifulsoup4 4.11.1 develop
- certifi 2022.12.7 develop
- cfgv 3.3.1 develop
- charset-normalizer 2.0.12 develop
- click 8.1.3 develop
- colorama 0.4.6 develop
- distlib 0.3.6 develop
- docutils 0.19 develop
- dparse 0.6.2 develop
- filelock 3.8.2 develop
- flake8 5.0.4 develop
- flake8-docstrings 1.6.0 develop
- furo 2022.12.7 develop
- gitdb 4.0.10 develop
- gitpython 3.1.30 develop
- identify 2.5.10 develop
- idna 3.4 develop
- imagesize 1.4.1 develop
- importlib-metadata 5.1.0 develop
- isort 5.11.4 develop
- jinja2 3.1.2 develop
- livereload 2.6.3 develop
- markupsafe 2.1.1 develop
- mccabe 0.7.0 develop
- nodeenv 1.7.0 develop
- packaging 21.3 develop
- pbr 5.11.0 develop
- pexpect 4.8.0 develop
- platformdirs 2.6.0 develop
- pre-commit 2.21.0 develop
- pre-commit-hooks 4.4.0 develop
- ptyprocess 0.7.0 develop
- pycodestyle 2.9.1 develop
- pydocstyle 6.1.1 develop
- pyflakes 2.5.0 develop
- pygments 2.13.0 develop
- pyparsing 3.0.9 develop
- pytz 2022.6 develop
- pyupgrade 3.3.1 develop
- pyyaml 6.0 develop
- requests 2.27.1 develop
- ruamel-yaml 0.17.21 develop
- ruamel-yaml-clib 0.2.7 develop
- safety 2.3.5 develop
- smmap 5.0.0 develop
- snowballstemmer 2.2.0 develop
- soupsieve 2.3.2.post1 develop
- sphinx 5.3.0 develop
- sphinx-autobuild 2021.3.14 develop
- sphinx-basic-ng 1.0.0b1 develop
- sphinxcontrib-applehelp 1.0.2 develop
- sphinxcontrib-devhelp 1.0.2 develop
- sphinxcontrib-htmlhelp 2.0.0 develop
- sphinxcontrib-jsmath 1.0.1 develop
- sphinxcontrib-qthelp 1.0.3 develop
- sphinxcontrib-serializinghtml 1.1.5 develop
- stevedore 4.1.1 develop
- tokenize-rt 5.0.0 develop
- toml 0.10.2 develop
- tomli 2.0.1 develop
- tornado 6.2 develop
- urllib3 1.26.13 develop
- virtualenv 20.17.1 develop
- zipp 3.11.0 develop
- ansicon 1.89.0
- blessed 1.19.1
- jinxed 1.2.0
- python-editor 1.0.4
- readchar 4.0.3
- setuptools 65.6.3
- six 1.16.0
- wcwidth 0.2.5
- bandit >=1.7.4 develop
- flake8 >=4.0.1,<6.0.0 develop
- flake8-docstrings >=1.6.0 develop
- furo >=2022.9.29 develop
- isort >=5.10.1 develop
- pexpect >=4.8.0 develop
- pre-commit >=2.17.0 develop
- pre-commit-hooks >=4.3.0 develop
- pyupgrade >=2.31.1 develop
- safety >=2.3.1 develop
- sphinx >=5.3.0 develop
- sphinx-autobuild >=2021.3.14 develop
- blessed >=1.19.0
- python >=3.8
- python-editor >=1.0.4
- readchar >=3.0.6