Metadata-Version: 2.3
Name: prompts.py
Version: 0.1.1
Summary: Beautiful prompts for Python.
Project-URL: Documentation, https://github.com/ZeroIntensity/prompts.py#readme
Project-URL: Issues, https://github.com/ZeroIntensity/prompts.py/issues
Project-URL: Source, https://github.com/ZeroIntensity/prompts.py
Author-email: ZeroIntensity <zintensitydev@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.8
Requires-Dist: colorama
Requires-Dist: typing-extensions
Provides-Extra: click
Requires-Dist: click; extra == 'click'
Description-Content-Type: text/markdown

# prompts.py

## Beautiful prompts for Python.

[![PyPI - Version](https://img.shields.io/pypi/v/prompts.svg)](https://pypi.org/project/prompts.py)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/prompts.svg)](https://pypi.org/project/prompts.py)

_Inspired by the [prompts](https://www.npmjs.com/package/prompts) package on NPM. This project was written specifically for [view.py](https://github.com/ZeroIntensity/view.py)_

---

## Example

![Alt Text](https://raw.githubusercontent.com/ZeroIntensity/prompts.py/master/assets/example.gif)

```py
from prompts import ask, ValidatorResult

def validate(name: str) -> ValidatorResult:
    if name == "andrew":
        return "You're not allowed here, buddy!"

    return True

ask("What's your name?", validate=validate)
```

## Features

-   Fully typed
-   Extendable
-   Drop-in support for [Click](https://click.palletsprojects.com/)

### Click Example

```py
from prompts.integration import PrettyOption
import click

@click.command()
@click.option(
    "--name",
    default="Peter",
    prompt=True,
    cls=PrettyOption,  # Enable prompts.py inputs!
)
def main(name: str):
    ...

if __name__ == "__main__":
    main()
```

## Installation

```console
$ pip install prompts.py
```

## License

`prompts.py` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
