trafaret validator wrapper
Project description
Install:
pip install trafaret_validator
- Status:
Beta
This is a wrapper that validate params using Trafaret ( http://trafaret.readthedocs.org/en/latest/ ).
Usage:
import trafaret as t
from trafaret_validator import TrafaretValidator
class RequestValidator(TrafaretValidator):
ids = t.List(t.Int)
payload = t.Dict(x=t.String)
validator = RequestValidator(ids=ids, payload=payload)
if not validator.validate():
return validator.errors
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.