{
"info": {
"author": "",
"author_email": "",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 1 - Planning",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: User Interfaces"
],
"description": "# inquirerpy\n\nA collection of common interactive command line user interfaces.\n\n## Table of Contents\n\n 1. [Documentation](#documentation)\n 1. [Installation](#installation)\n 2. [Examples](#examples)\n 3. [Quickstart](#quickstart)\n 4. [Question Types](#types)\n 5. [Question Properties](#properties)\n 6. [User Interfaces and Styles](#styles)\n 2. [Windows Platform](#windows)\n 3. [Support](#support)\n 4. [Contributing](#contributing)\n 5. [Acknowledgments](#acknowledgements)\n 6. [License](#license)\n\n\n## Goal and Philosophy\n\n**`inquirerpy`** strives to be an easily embeddable and beautiful command line interface for [Python](https://python.org/). **`inquirerpy`** wants to make it easy for existing Inquirer.js users to write immersive command line applications in Python. We are convinced that its feature-set is the most complete for building immersive CLI applications. We also hope that **`inquirerpy`** proves itself useful to Python users.\n\n**`inquirerpy`** should ease the process of\n- providing *error feedback*\n- *asking questions*\n- *parsing* input\n- *validating* answers\n- managing *hierarchical prompts*\n\n**Note:** **`inquirerpy`** provides the user interface and the inquiry session flow.\n> \nIf you're searching for a scaffolding utility, then check out [banana](https://github.com/finklabs/banana), the inquirerpy's sister utility.\n\n\n## Documentation\n\n\n\n### Installation\n\n\nLike most Python packages inquirerpy is available on [PyPi](TODO). Simply use pip to install the inquirerpy package\n\n``` shell\npip install inquirer\n```\n\n\n### Quickstart\n\n\nLike Inquirer.js, using inquirer is structured into two simple steps:\n\n* you define a **list of questions** and hand them to **prompt**\n* promt returns a **list of answers**\n\n```python\nfrom __future__ import print_function, unicode_literals\nfrom inquirer import prompt, print_json\n\nanswers = prompt(questions)\nprint_json(answers) # use the answers as input for your app\n```\n\nA good starting point from here is probably the examples section.\n\n\n### Examples\n\n\nMost of the examples intend to demonstrate a single question type or feature:\n\n* bottom-bar.py\n* expand.py\n* list.py\n* password.py\n* recursive.py\n* when.py\n* checkbox.py\n* hierarchical.py\n* long-list.py\n* pizza.py - demonstrate a using different question types\n* rx-observable-array.py\n* editor.py\n* input.py\n* nested-call.py\n* rawlist.py\n* rx-observable-create.py\n\n\n### Question Types\n\n\n`questions` is a list of questions. Each question has a type.\n\n#### List - `{type: 'list'}`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must be the choice `index` in the array or a choice `value`)\n\n\n\n---\n\n#### Raw List - `{type: 'rawlist'}`\n\nTake `type`, `name`, `message`, `choices`[, `default`, `filter`] properties. (Note that\ndefault must the choice `index` in the array)\n\n\n\n---\n\n#### Expand - `{type: 'expand'}`\n\nTake `type`, `name`, `message`, `choices`[, `default`] properties. (Note that\ndefault must be the choice `index` in the array. If `default` key not provided, then `help` will be used as default choice)\n\nNote that the `choices` object will take an extra parameter called `key` for the `expand` prompt. This parameter must be a single (lowercased) character. The `h` option is added by the prompt and shouldn't be defined by the user.\n\nSee `examples/expand.py` for a running example.\n\n\n\n\n---\n\n#### Checkbox - `{type: 'checkbox'}`\n\nTake `type`, `name`, `message`, `choices`[, `filter`, `validate`, `default`] properties. `default` is expected to be an Array of the checked choices value.\n\nChoices marked as `{checked: true}` will be checked by default.\n\nChoices whose property `disabled` is truthy will be unselectable. If `disabled` is a string, then the string will be outputted next to the disabled choice, otherwise it'll default to `\"Disabled\"`. The `disabled` property can also be a synchronous function receiving the current answers as argument and returning a boolean or a string.\n\n\n\n---\n\n#### Confirm - `{type: 'confirm'}`\n\nTake `type`, `name`, `message`[, `default`] properties. `default` is expected to be a boolean if used.\n\n\n\n---\n\n#### Input - `{type: 'input'}`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.\n\n\n\n---\n\n#### Password - `{type: 'password'}`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties.\n\n\n\n---\n\n#### Editor - `{type: 'editor'}`\n\nTake `type`, `name`, `message`[, `default`, `filter`, `validate`] properties\n\nLaunches an instance of the users preferred editor on a temporary file. Once the user exits their editor, the contents of the temporary file are read in as the result. The editor to use is determined by reading the $VISUAL or $EDITOR environment variables. If neither of those are present, notepad (on Windows) or vim (Linux or Mac) is used.\n\n\n### Question Properties\n\n\nA question is a dictionary containing question related values:\n\n* type: (String) Type of the prompt. Defaults: input - Possible values: input, confirm, list, rawlist, expand, checkbox, password, editor\n* name: (String) The name to use when storing the answer in the answers hash. If the name contains periods, it will define a path in the answers hash.\n* message: (String|Function) The question to print. If defined as a function, the first parameter will be the current inquirer session answers.\n* default: (String|Number|Array|Function) Default value(s) to use if nothing is entered, or a function that returns the default value(s). If defined as a function, the first parameter will be the current inquirer session answers.\n* choices: (Array|Function) Choices array or a function returning a choices array. If defined as a function, the first parameter will be the current inquirer session answers. Array values can be simple strings, or objects containing a name (to display in list), a value (to save in the answers hash) and a short (to display after selection) properties. The choices array can also contain a Separator.\n* validate: (Function) Receive the user input and should return true if the value is valid, and an error message (String) otherwise. If false is returned, a default error message is provided.\n* filter: (Function) Receive the user input and return the filtered value to be used inside the program. The value returned will be added to the Answers hash.\n* when: (Function, Boolean) Receive the current user answers hash and should return true or false depending on whether or not this question should be asked. The value can also be a simple boolean.\n* pageSize: (Number) Change the number of lines that will be rendered when using list, rawList, expand or checkbox.\n\n\n### User Interfaces and Styles\n\n\nTODO\n\n\n## Windows Platform\n\n\n**`inquirerpy`** is build on prompt_toolkit which is cross platform, and everything that you build on top should run fine on both Unix and Windows systems. On Windows, it uses a different event loop (WaitForMultipleObjects instead of select), and another input and output system. (Win32 APIs instead of pseudo-terminals and VT100.)\n\nIt's worth noting that the implementation is a \"best effort of what is possible\". Both Unix and Windows terminals have their limitations. But in general, the Unix experience will still be a little better.\n\nFor Windows, it's recommended to use either cmder or conemu.\n\n\n## Support\n\n\nMost of the questions are probably related to using a question type or feature. Please lookup and study the appropriate examples.\n\nIssue on Github TODO link\n\nFor many issues like for example common Python programming issues stackoverflow might be a good place to search for an answer. TODO link\n\nVisit the finklabs slack channel for announcements and news. TODO link\n\n\n## Contributing\n\n\nUnit test Unit test are written using pytest. Please add a unit test for every new feature or bug fix.\n\nDocumentation Add documentation for every API change. Feel free to send typo fixes and better docs!\n\nWe're looking to offer good support for multiple prompts and environments. If you want to help, we'd like to keep a list of testers for each terminal/OS so we can contact you and get feedback before release. Let us know if you want to be added to the list.\n\n\n## Acknowledgments\n\n\nMany thanks to our friends at Inquirer.js. We think they did a great job developing the tooling for nodejs.\n\n\n## License\n\n\nCopyright (c) 2016 Mark Fink (twitter: @markfink) Licensed under the MIT license.\n",
"description_content_type": null,
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "",
"keywords": "",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "form",
"package_url": "https://pypi.org/project/form/",
"platform": "",
"project_url": "https://pypi.org/project/form/",
"project_urls": null,
"release_url": "https://pypi.org/project/form/0.2.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Collection of common interactive command line user interfaces, based on Inquirer.js",
"version": "0.2.0"
},
"last_serial": 2538869,
"releases": {
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "fca4ed3fd543fcefe9ac29d4040328a5",
"sha256": "7a94c9704837d8f3f4bb436a04a6a1ced748f2e3fac38a06941de3f361c61a8c"
},
"downloads": -1,
"filename": "form-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "fca4ed3fd543fcefe9ac29d4040328a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12569,
"upload_time": "2016-12-25T19:36:38",
"url": "https://files.pythonhosted.org/packages/75/c3/1aa37eb4af7028bc6b44877c9f59ee709e348cd95f4c027f5f26d133cdbd/form-0.2.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "fca4ed3fd543fcefe9ac29d4040328a5",
"sha256": "7a94c9704837d8f3f4bb436a04a6a1ced748f2e3fac38a06941de3f361c61a8c"
},
"downloads": -1,
"filename": "form-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "fca4ed3fd543fcefe9ac29d4040328a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12569,
"upload_time": "2016-12-25T19:36:38",
"url": "https://files.pythonhosted.org/packages/75/c3/1aa37eb4af7028bc6b44877c9f59ee709e348cd95f4c027f5f26d133cdbd/form-0.2.0.tar.gz"
}
]
}