Posts tagged 'Schema'

Luca Lanziani

Python - validate command line args

Ok, in the last article I've shown you a tool to write a nice command line interface, but it doesn't help you on validation.

    level = int(args['--log-level'])
except ValueError:
    raise ArgsError('--log-level has to be a valid integer')

Manual validation? There is a much better way to do …