trafaret validator wrapper
Project description
====================
TrafaretValidator
====================
:Status: Beta
This is a wrapper that validate request using trafaret_.
Usage:
.. code-block:: python
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
TrafaretValidator
====================
:Status: Beta
This is a wrapper that validate request using trafaret_.
Usage:
.. code-block:: python
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.