Skip to content

mentat-enki/schematics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Schematics

Python Data Structures for Humans™.

Build Status

Show me the Code!

>>> from schematics.models import Model
>>> from schematics.types import StringType
>>> class Person(Model):
...     name = StringType(required=True)
...
>>> person = Person({'name': u'Joey Bada$$'})
>>> person.name
u'Joey Bada$$'

Let’s see some validation

>>> person = Person()
>>> try:
...     person.validate()
... except ValidationError, e:
...     print e.messages
{'name': [u'This field is required.']}

Installation

$ pip install schematics

Python 2.7 is supported. 2.6 support is close but test suite needs to be updated.

Documentation

schematics.readthedocs.org

Tests

Using py.test:

$ py.test tests/

Authors

About

Python Data Structures for Humans™.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published