OpenQuizz
Une application de gestion des contenus pédagogiques
TypeCodec Class Reference
Inheritance diagram for TypeCodec:
Collaboration diagram for TypeCodec:

Additional Inherited Members

- Public Member Functions inherited from TypeEncoder
def python_type (self)
 
def transform_python (self, value)
 
- Public Member Functions inherited from TypeDecoder
def bson_type (self)
 
def transform_bson (self, value)
 

Detailed Description

Base class for defining type codec classes which describe how a
custom type can be transformed to/from one of the types :mod:`bson`
can already encode/decode.

Codec classes must implement the ``python_type`` attribute, and the
``transform_python`` method to support encoding, as well as the
``bson_type`` attribute, and the ``transform_bson`` method to support
decoding.

See :ref:`custom-type-type-codec` documentation for an example.

The documentation for this class was generated from the following file: