Easy input validation for python
Project description
Easy input validation for python
Installation
pip install ask
Usage
>>> from ask import ask, askChar, askInt, askString >>> ask() # Creates an empty input query here >>> askInt('Your age') Your age # Input here (Only accepts integers) >>> askString("What's your name?") What's your name? # Input here >>> askChar('Do you want to proceed?', ['y','n']) Do you want to proceed? (y, n) # Input here (Only accepts 'y' and 'n') >>> askChar('Do you want to install this?', ['y','n'], 'y') Do you want to install this? (y, n) [y] # Input here (Only accepts 'y' and 'n', you can hit enter to use the default 'y')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ask-0.0.2.tar.gz
(2.9 kB
view details)
File details
Details for the file ask-0.0.2.tar.gz
.
File metadata
- Download URL: ask-0.0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc5a8f1219ad7afffd02ef468765101a40b62d652e2458d26616f57b21ef027 |
|
MD5 | 03b31be05e235f5af4476efdc2fc192b |
|
BLAKE2b-256 | 37cff8a8bc5f20121e7ce11128e36320bc31b4b92d85d3592de68a86030ab3d5 |