Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (47 sloc) 1.54 KB


Colander is useful as a system for validating and deserializing data obtained via XML, JSON, an HTML form post or any other equally simple data serialization. Colander can be used to:

  • Define a data schema.
  • Deserialize a data structure composed of strings, mappings, and lists into an arbitrary Python structure after validating the data structure against a data schema.
  • Serialize an arbitrary Python structure to a data structure composed of strings, mappings, and lists.

Colander is a good basis for form generation systems, data description systems, and configuration systems.

Out of the box, Colander can serialize and deserialize various types of objects, including:

  • A mapping object (e.g. dictionary).
  • A variable-length sequence of objects (each object is of the same type).
  • A fixed-length tuple of objects (each object is of a different type).
  • A string or Unicode object.
  • An integer.
  • A float.
  • A decimal float.
  • A boolean.
  • An importable Python object (to a dotted Python object path).
  • A Python datetime.datetime object.
  • A Python object.

Colander allows additional data structures to be serialized and deserialized by allowing a developer to define new "types".

The error messages used by Colander's default types are internationalizable.

Indices and tables

Jump to Line
Something went wrong with that request. Please try again.