noneprompt


Namenoneprompt JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/nonebot/noneprompt
SummaryPrompt toolkit for console interaction
upload_time2022-12-26 04:55:59
maintainer
docs_urlNone
authoryanyongyu
requires_python>=3.7.3,<4.0.0
licenseMIT
keywords prompt inquirer prompt-toolkit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NonePrompt

Prompt toolkit for console interaction.

Typing is supported.

## Installation

```bash
pip install noneprompt
```

## Usage

### Input

```python
from noneprompt import InputPrompt

InputPrompt("What is your name?", validator=lambda string: True).prompt()
```

### Confirm

```python
from noneprompt import ConfirmPrompt

ConfirmPrompt("Are you sure?", default_choice=False).prompt()
```

### List

```python
from noneprompt import ListPrompt, Choice

ListPrompt("What is your favorite color?", choices=[Choice("Red"), Choice("Blue")]).prompt()
```

### Checkbox

```python
from noneprompt import CheckboxPrompt, Choice

CheckboxPrompt("Choose your favorite colors", choices=[Choice("Red"), Choice("Blue")]).prompt()
```

## Try from command line

```bash
noneprompt -h
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nonebot/noneprompt",
    "name": "noneprompt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.3,<4.0.0",
    "maintainer_email": "",
    "keywords": "prompt,inquirer,prompt-toolkit",
    "author": "yanyongyu",
    "author_email": "yyy@nonebot.dev",
    "download_url": "https://files.pythonhosted.org/packages/53/a1/eaaf9eeac551c9bf535f91d6143af475f0c195241487ee483648cc164de5/noneprompt-0.1.7.tar.gz",
    "platform": null,
    "description": "# NonePrompt\n\nPrompt toolkit for console interaction.\n\nTyping is supported.\n\n## Installation\n\n```bash\npip install noneprompt\n```\n\n## Usage\n\n### Input\n\n```python\nfrom noneprompt import InputPrompt\n\nInputPrompt(\"What is your name?\", validator=lambda string: True).prompt()\n```\n\n### Confirm\n\n```python\nfrom noneprompt import ConfirmPrompt\n\nConfirmPrompt(\"Are you sure?\", default_choice=False).prompt()\n```\n\n### List\n\n```python\nfrom noneprompt import ListPrompt, Choice\n\nListPrompt(\"What is your favorite color?\", choices=[Choice(\"Red\"), Choice(\"Blue\")]).prompt()\n```\n\n### Checkbox\n\n```python\nfrom noneprompt import CheckboxPrompt, Choice\n\nCheckboxPrompt(\"Choose your favorite colors\", choices=[Choice(\"Red\"), Choice(\"Blue\")]).prompt()\n```\n\n## Try from command line\n\n```bash\nnoneprompt -h\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Prompt toolkit for console interaction",
    "version": "0.1.7",
    "split_keywords": [
        "prompt",
        "inquirer",
        "prompt-toolkit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "55806c801aa57de13b9164495971839e",
                "sha256": "f45d86b147fafaefb7dd9ae6cdf06c9211c2fbe31193770153dc832573930296"
            },
            "downloads": -1,
            "filename": "noneprompt-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55806c801aa57de13b9164495971839e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.3,<4.0.0",
            "size": 16769,
            "upload_time": "2022-12-26T04:55:58",
            "upload_time_iso_8601": "2022-12-26T04:55:58.294375Z",
            "url": "https://files.pythonhosted.org/packages/72/36/64a6143f859098e36214064aad264fe2b89bc720f55ece016891f3a78f51/noneprompt-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ccc2941839c9d29fb1dc1e71dd4c350f",
                "sha256": "f21a6473ae02dec301e7b591ff5799c15b6ef0206f0eef3a0da510cea9cabdbf"
            },
            "downloads": -1,
            "filename": "noneprompt-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "ccc2941839c9d29fb1dc1e71dd4c350f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.3,<4.0.0",
            "size": 9428,
            "upload_time": "2022-12-26T04:55:59",
            "upload_time_iso_8601": "2022-12-26T04:55:59.533332Z",
            "url": "https://files.pythonhosted.org/packages/53/a1/eaaf9eeac551c9bf535f91d6143af475f0c195241487ee483648cc164de5/noneprompt-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-26 04:55:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "nonebot",
    "github_project": "noneprompt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "noneprompt"
}
        
Elapsed time: 0.03143s