Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install validictory

How to install validictory

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install validictory
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.9.1 Available View build log
0.8.3 Available View build log
0.8.2 Available View build log
0.8.1 Available View build log
0.7.2 Available View build log
0.7.1 Available View build log
0.7.0 Available View build log
0.6.1 Available View build log
0.6.0 Available View build log
0.5.0 Available View build log
0.4.2 Available View build log
0.4.1 Available View build log
Windows (64-bit)
0.9.1 Available View build log
0.8.3 Available View build log
0.8.2 Available View build log
0.8.1 Available View build log
0.7.2 Available View build log
0.7.1 Available View build log
0.7.0 Available View build log
0.6.1 Available View build log
0.6.0 Available View build log
0.5.0 Available View build log
0.4.2 Available View build log
0.4.1 Available View build log
Mac OS X (10.5+)
0.9.1 Available View build log
0.8.3 Available View build log
0.8.2 Available View build log
0.8.1 Available View build log
0.7.2 Available View build log
0.7.1 Available View build log
0.7.0 Available View build log
0.6.1 Available View build log
0.6.0 Available View build log
0.5.0 Available View build log
0.4.2 Available View build log
0.4.1 Available View build log
Linux (32-bit)
0.9.1 Available View build log
0.8.3 Available View build log
0.8.2 Available View build log
0.8.1 Available View build log
0.7.2 Available View build log
0.7.1 Available View build log
0.7.0 Available View build log
0.6.1 Available View build log
0.6.0 Available View build log
0.5.0 Available View build log
0.4.2 Available View build log
0.4.1 Available View build log
Linux (64-bit)
0.9.1 Available View build log
0.9.0 Available View build log
0.8.3 Available View build log
0.8.2 Available View build log
0.8.1 Available View build log
0.7.2 Available View build log
0.7.1 Available View build log
0.7.0 Available View build log
0.6.1 Available View build log
0.6.0 Available View build log
0.5.0 Available View build log
0.4.2 Available View build log
0.4.1 Available View build log
0.9.1 Available View build log
0.9.0 Available View build log
 
Author
License
MIT License
Lastest release
version 0.9.1 on May 24th, 2013

A general purpose Python data validator.

Works with Python 2.6+ and Python 3.2+

Schema format based on JSON Schema Proposal (http://json-schema.org)

Contains code derived from jsonschema, by Ian Lewis and Yusuke Muraoka.

Usage

JSON documents and schema must first be loaded into a Python dictionary type before it can be validated.

Parsing a simple JSON document:

>>> import validictory
>>>
>>> validictory.validate("simplejson", {"type":"string"})

Parsing a more complex JSON document:

>>> import simplejson
>>> import validictory
>>>
>>> data = simplejson.loads('["foo", {"bar":["baz", null, 1.0, 2]}]')
>>> schema = {
...   "type":"array",
...   "items":[
...     {"type":"string"},
...     {"type":"object",
...      "properties":{
...        "bar":{
...          "items":[
...            {"type":"string"},
...            {"type":"any"},
...            {"type":"number"},
...            {"type":"integer"}
...          ]
...        }
...      }
...    }
...   ]
... }
>>> validictory.validate(data,schema)

Catch ValueErrors to handle validation issues:

>>> import validictory
>>>
>>> try:
...     validictory.validate("simplejson", {"type":"string","minLength":15})
... except ValueError, error:
...     print error
...
Length of value 'simplejson' for field '_data' must be greater than or equal to 15

You can read more in the official documentation at Read the Docs.

Subscribe to package updates

Last updated May 24th, 2013

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.