1.8 KiB
Glossary
- cstruct
-
A data structure generated by the
colander.SchemaNode.serialize
method, capable of being consumed by thecolander.SchemaNode.deserialize
method. - appstruct
-
A raw application data structure (a structure of complex Python objects), passed to the
colander.SchemaNode.serialize
method for serialization. Thecolander.SchemaNode.deserialize
method accepts acstruct
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 acstruct
and deserialize aappstruct
from acstruct
an (object derived fromcolander.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 acstruct
. Colander has various built-in types (colander.String
,colander.Mapping
, etc) and may be extended with additional types (seedefining_a_new_type
). - validator
-
A Colander validator callable. Accepts a
node
object and avalue
and either raises ancolander.Invalid
exception or returnsNone
. Used as thevalidator=
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 (seedefining_a_new_validator
).