Framework for generating formatted user input questions.
Project description
MultiChoice
MultiChoice is a framework for generating formatted user input queries on the terminal.
Table of Contents
- API Documentation
- Question: Fill-in-the-blank
- TrueFalse: True or False
- MultiChoice: Multiple Choice
- Developer Log
API Documentation
Class: Question
Question(query)
Question: Generates fill in the blank style questions.
__call__(self)
- Return: String. Returns the user selection.
__init__(self, query, required=True, cursor='>>>')
- Param query: String. Question for the user.
- Param required: Optional Bool. Default=True True: Repeats question until answered. False: Accepts null input as an empty string.
- Param cursor: Optional String. Default='>>>' Indicates user input field.
Class: TrueFalse
TrueFalse(query)
TrueFalse: Generates True or False style questions.
__call__(self)
- Return: String. Returns the user selection.
__init__(self, query, required=True, strict=True, cursor='>>>')
- Param query: String. Question for the user.
- Param required: Optional Bool. Default=True True: Repeats question until answered. False: Accepts null input as an empty string.
- Param strict: Optional Bool. Default=True True: Answer must be in the options tuple. Not case-sensitive. False: Accepts any answer.
- Param cursor: Optional String. Default='>>>' Indicates user input field.
Class: MultiChoice
MultiChoice(query, options)
MultiChoice: Generates multiple choice style questions.
__call__(self)
- Return: String. Returns the user selection.
__init__(self, query, options, required=True, strict=True, cursor='>>>')
- Param query: String. Question for the user.
- Param options: Tuple of Strings. Options presented to the user as a numbered sequence. Numbers are generated automatically. The user may enter an answer as text or one of the numbers.
- Param required: Optional Bool. Default=True True: Repeats question until answered. False: Accepts null input as an empty string.
- Param strict: Optional Bool. Default=True True: Answer must be in the options tuple. Not case-sensitive. False: Accepts any answer.
- Param cursor: Optional String. Default='>>>' Indicates user input field.
Developer Log
MultiChoice v0.3.1
- Added custom cursor option.
- Documentation update
MultiChoice v0.2 (internal)
- API update
MultiChoice v0.1
- Initial Project
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
MultiChoice-0.3.1.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for MultiChoice-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a76b142c993f9423c3c8a16267863c657376d69989b5414cd9e91dd7acaf398a |
|
MD5 | 78345e60cdd2379b792de6fbd280059c |
|
BLAKE2b-256 | 2ebe44e4f383fdb3771b6991b45c2ceadca6a030c73ffaf243c8920075ac2b2a |