checkist
Minimal module for argument checking
install
pip install checkist
usage
let's say you have a list of valid arugments
valid = ['elf', 'mage', 'knight']
you can check against it like this
checkist.opts('elf', valid)
checkist.opts('mage', valid)
checkist.opts('archer', valid)
>> ValueError: Option must be one of 'elf', 'mage', 'knight', got 'archer'