Skip to main content

Question Answer Validation

Project description

Question Answer Validation (qav)

pypi version license pyversions pipeline status coverage report

qav is a Python library for console-based question and answering, with the ability to validate input.

It provides question sets to group related questions. Questions can also have subordinate Questions underneath them. Answers to those questions can be validated based on a simple, static piece of information provided by you. Answers may also be validated dynamically based on the information provided in previous questions.

Example Usage

>>> from qav.questions import Question
>>> from qav.validators import ListValidator
>>> q = Question('How old am I? ', 'age', ListValidator(['20', '35', '40']))
>>> q.ask()
Please select from the following choices:
 [0] - 20
 [1] - 35
 [2] - 40
How old am I? : 0
>>> q.answer()
# returns => {'age': '20'}

Requirements

netaddr

Installation

$ pip install qav

Compatibility

This library has been tested to support:

  • Python 3.6

It most likely will still run on Python 2.7, but official support has been dropped.

License

qav - question answer validation in Python
Copyright (C) 2015  UMIACS

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Email:
    github@umiacs.umd.edu

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

qav-1.1.3.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qav-1.1.3-py2.py3-none-any.whl (18.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file qav-1.1.3.tar.gz.

File metadata

  • Download URL: qav-1.1.3.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

File hashes

Hashes for qav-1.1.3.tar.gz
Algorithm Hash digest
SHA256 ce57a34848174e65bf43df5b1b21760a5b321e0eab57c4dd4903ba19df059d11
MD5 5a17ab6c75a81890e1c372b6beb966e5
BLAKE2b-256 41ba04f6f0fa329da31a2f17adb4b2345588ef545a33e256a2454577221eb7d8

See more details on using hashes here.

File details

Details for the file qav-1.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: qav-1.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10

File hashes

Hashes for qav-1.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6d705f0deef3528e83fe2a0042a15c1817f7a461c0a95d576c54bb66d64be392
MD5 7d2112932a22254b3abd7d3da599c771
BLAKE2b-256 cb4490a904297072b184fb998ad89d6684cd9b229c73f0396f3f2e2cd79b725d

See more details on using hashes here.

Supported by

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