Question Answer Validation
Project description
Question Answer Validation (qav)
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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file qav-1.1.9.tar.gz
.
File metadata
- Download URL: qav-1.1.9.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b86b91d7f776c3d2de9999ef5c74aef31fb3e26d029dac5bb8b1772072e76ef |
|
MD5 | a73b261202468324ec8338efea426486 |
|
BLAKE2b-256 | e520357f0c7f3c2f5de9b216cae7ef03214d86c30d487f6724a7230d8c052f5d |
File details
Details for the file qav-1.1.9-py2.py3-none-any.whl
.
File metadata
- Download URL: qav-1.1.9-py2.py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.19 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7cc7f946feecddf031bc5a95acbf4e96ab0b61aae23b4a0767094b48ab1d74c |
|
MD5 | 7b1f064f0ce79f3880d75e28a2256dcd |
|
BLAKE2b-256 | e0b3ae2167746ef921f44c8037ea01d422a761b2f4c75871c6ed6fcc22ae283e |