Easy input validation for python
Installation
pip install ask
Usage
>>> from ask import ask, askChar, askInt, askString, askPassword, askEmail, askBool, explain
>>> 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')
>>> askBool('Do you want to continue?')
Do you want to continue (y/n)
# Input here (automatically generates the possibilites 'y' and 'n')
>>> askEmail()
# Input here (only accepts email-adresses)
>> askPassword()
# Masked input here
>> explain()
# Prints explanation:
Attention: Input prompts follow this template:
"Question (answer1, answer2, answer3) [default_answer]"
(You can just hit enter to chose the default answer)
Metadata
Release files for ask 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ask-0.0.8.tar.gz | 3.5 kB | Without provenance | Details for ask-0.0.8.tar.gz |
Release files / ask-0.0.8.tar.gz
| Download URL | ask-0.0.8.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
808540c1f9c25e5e7905c98a7d62902c32a8a9146d904ce6aaa314b14e978416
|
|
BLAKE2b-256 checksum How to use checksums |
0e286358c4c018bb22fe11508c8e724c731c33844bddc94ae125648056885dcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ask 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.