/python-prompt

:snake: Python library for the validation of user input

Primary LanguagePythonMIT LicenseMIT

Python Prompt Package

PyPI Version Travis Coverage Status Documentation Status

Prompt and verify user input on the command line.
Python 3.3+ and Wheels are supported.

The project was initiated by Stefan Fischer.

Install

PyPI Python Versions PyPI Wheel

The package is available on PyPI:

$ pip install prompt

Use

An extensive documentation is available.

Some simple use cases:

import prompt

email = prompt.email()

# modify default prompt
integer = prompt.integer(prompt="Please enter a number: ")

# allow empty response
real = prompt.real(empty=True)

# require a two digit number using a regular expression
regex = prompt.regex("^\d\d$")

Contribute

Write a bug report or send a pull request.
Other contributors have done so before.

License

Copyright (c) 2015-2017 Stefan Fischer
The source code is available under the MIT License.
See LICENSE for further details.