Files
deb-python-colander/docs/glossary.rst
2010-06-09 14:22:40 +00:00

1.8 KiB

Glossary

cstruct

A data structure generated by the colander.SchemaNode.serialize method, capable of being consumed by the colander.SchemaNode.deserialize method.

appstruct

A raw application data structure (a structure of complex Python objects), passed to the colander.SchemaNode.serialize method for serialization. The colander.SchemaNode.deserialize method accepts a cstruct and returns an appstruct.

schema

A nested collection of schema node objects representing an arrangement of data.

schema node

A schema node is an object which can serialize an appstruct to a cstruct and deserialize a appstruct from a cstruct an (object derived from colander.SchemaNode or one of the colander Schema classes).

type

An object representing a particular type of data (mapping, boolean, string, etc) capable of serializing an appstruct and of deserializing a cstruct. Colander has various built-in types (colander.String, colander.Mapping, etc) and may be extended with additional types (see defining_a_new_type).

validator

A Colander validator callable. Accepts a node object and a value and either raises an colander.Invalid exception or returns None. Used as the validator= argument to a schema node, ensuring that the input meets the requirements of the schema. Built-in validators exist in Colander (e.g. colander.OneOf, colander.Range, etc), and new validators can be defined to extend Colander (see defining_a_new_validator).