Collection of common interactive command line user interfaces, based on Inquirer.js
Project description
VERSION |
DOWNLOADS |
TESTS |
COVERAGE |
|---|---|---|---|
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.
Documentation
Documentation has been moved to ReadTheDocs.
But here you have a couple of usage examples:
Text
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+', x),
)
]
answers = inquirer.prompt(questions)
List
Shows a list of choices, and allows the selection of one of them.
Example:
import inquirer
questions = [
inquirer.List('size',
message="What size do you need?",
choices=['Jumbo', 'Large', 'Standard', 'Medium', 'Small', 'Micro'],
),
]
answers = inquirer.prompt(questions)
Checkbox
Shows a list of choices, with multiple selection.
Example:
import inquirer
questions = [
inquirer.Checkbox('interests',
message="What are you interested in?",
choices=['Computers', 'Books', 'Science', 'Nature', 'Fantasy', 'History'],
),
]
answers = inquirer.prompt(questions)
License
Copyright (c) 2014 Miguel Ángel García (@magmax9), based on Inquirer.js, by Simon Boudrias (@vaxilart)
Licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inquirer-2.1.3.tar.gz.
File metadata
- Download URL: inquirer-2.1.3.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
634e8786a5c0cb2394f0d842e019af76378220b746f5bae9f267bf81546ea887
|
|
| MD5 |
f4562e48def1c751d91d6fb9d5570d35
|
|
| BLAKE2b-256 |
6917b727b1e9e366ef5e3eebbf6da10910c8ff4abfcbd708073d93ea98f52d45
|
File details
Details for the file inquirer-2.1.3-py2-none-any.whl.
File metadata
- Download URL: inquirer-2.1.3-py2-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1e689b4311afbac10089ee1c4f01b6fa555374163e97a4acf0aa384c10582e6
|
|
| MD5 |
c460fb220434f6ca235c27768c81d467
|
|
| BLAKE2b-256 |
4a71f5b91d37270ec193c1e65d5ff91f9a0957d35e8100071c85e2526baa6e01
|