qav package¶
Submodules¶
qav.filters module¶
-
class
qav.filters.
DynamicFilter
(filterable_func)[source]¶ Bases:
qav.filters.Filter
A Filter that can dynamically prune choices based off of whether filterable_func(choice[, table]) returns True or False.
-
class
qav.filters.
PostFilter
(string)[source]¶ Bases:
qav.filters.Filter
-
class
qav.filters.
PreFilter
(string)[source]¶ Bases:
qav.filters.Filter
-
class
qav.filters.
SubFilter
(string)[source]¶ Bases:
qav.filters.Filter
qav.listpack module¶
qav.questions module¶
-
class
qav.questions.
Question
(question, value, validator=None, multiple=False, printable_name=None)[source]¶ Bases:
object
-
answer
()[source]¶ Return the answer for the question from the validator.
This will ultimately only be called on the first validator if multiple validators have been added. Since we ultimately we and all the validators this should not cause any issues.
-
ask
(answers=None)[source]¶ Ask the question, then ask any sub-questions.
This returns a dict with the {value: answer} pairs for the current question plus all decendent questions.
-
qav.validators module¶
-
class
qav.validators.
CompactListValidator
(choices)[source]¶ Bases:
qav.validators.Validator
Accepts a list of choices like ListValidator but doesn’t print validator choices.
-
class
qav.validators.
DateValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
Accepts dates in the format YYYYMMDD
-
date_regex
= <_sre.SRE_Pattern object>¶
-
-
class
qav.validators.
DomainNameValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
-
class
qav.validators.
EmailValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
-
email_regex
= <_sre.SRE_Pattern object>¶
-
-
class
qav.validators.
HashValidator
(choices, filters=None, verbose=True)[source]¶ Bases:
qav.validators.Validator
-
choices
¶
-
-
class
qav.validators.
IPAddressValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
-
class
qav.validators.
IPNetmaskValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
-
class
qav.validators.
ListValidator
(choices, filters=None)[source]¶ Bases:
qav.validators.Validator
-
choices
¶
-
-
class
qav.validators.
MacAddressValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
-
macaddr_regex
= <_sre.SRE_Pattern object>¶
-
-
class
qav.validators.
TupleValidator
(choices, filters=None)[source]¶ Bases:
qav.validators.Validator
-
choices
¶
-
-
class
qav.validators.
URIValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator
-
uri_regex
= <_sre.SRE_Pattern object>¶
-
-
class
qav.validators.
YesNoValidator
(blank=False, negate=False)[source]¶ Bases:
qav.validators.Validator