Skip to main content

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.5.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file ask-0.0.5.tar.gz.

File metadata

  • Download URL: ask-0.0.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ask-0.0.5.tar.gz
Algorithm Hash digest
SHA256 75b8ee398fa51cee4d82dc027595869a5da928b89231c0bd31cacc366a6deb03
MD5 bc16049fa9767babcb0118d68163777b
BLAKE2b-256 16c8426479cb29f8d0760a3b0df48b220fed48ae59a6b3c354a48de65e9080ca

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page