clean-validator

Used to validate objects cleanly and simply. Very good for testing implementation. ;)


Keywords
validate
License
GPL-3.0
Install
pip install clean-validator==0.0.5

Documentation

clean-validator

https://travis-ci.org/sxslex/clean-validator.svg?branch=master

Used to validate objects cleanly and simply.

Very good for testing implementation. ;)

Usage in python

>>> import clean_validator
>>>
>>> if clean_validator.assert_valid_object({"name": "SleX"}, {"name": str}):
>>>     print('OK')
>>>
>>> if clean_validator.assert_valid_object(
>>>     [
>>>         {"email": "sx.slex@gmail.com", "name": "SleX", "idade": 37},
>>>         {"email": "slex@slex.com.br", "name": "Alexandre"},
>>>     ],
>>>     [{
>>>         "email": lambda e: '@' in e and '.' in e,
>>>         "name": str,
>>>         "idade": (int, clean_validator.TypeNone,),
>>>     }]
>>> ):
>>>     print('OK')
>>>

Installation

Use pip or easy_install:

$ pip install clean-validator

Development

Use py.test

Use pep8