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

Public Member Functions

def bson_type (self)
 
def transform_bson (self, value)
 

Detailed Description

Base class for defining type codec classes which describe how a
BSON type can be transformed to a custom type.

Codec classes must implement the ``bson_type`` attribute, and the
``transform_bson`` method to support decoding.

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

Member Function Documentation

◆ bson_type()

def bson_type (   self)
The BSON type to be converted into our own type.

◆ transform_bson()

def transform_bson (   self,
  value 
)
Convert the given BSON value into our own type.

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