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

Public Member Functions

def python_type (self)
 
def transform_python (self, value)
 

Detailed Description

Base class for defining type codec classes which describe how a
custom type can be transformed to one of the types BSON understands.

Codec classes must implement the ``python_type`` attribute, and the
``transform_python`` method to support encoding.

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

Member Function Documentation

◆ python_type()

def python_type (   self)
The Python type to be converted into something serializable.

◆ transform_python()

def transform_python (   self,
  value 
)
Convert the given Python object into something serializable.

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