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

Public Member Functions

def __init__ (self, multidict, ma.Schema schema, typing.Tuple[typing.Type,...] known_multi_fields=(ma.fields.List, ma.fields.Tuple,))
 
def __getitem__ (self, key)
 
def __str__ (self)
 
def __repr__ (self)
 
def __delitem__ (self, key)
 
def __setitem__ (self, key, value)
 
def __getattr__ (self, name)
 
def __iter__ (self)
 
def __contains__ (self, x)
 
def __len__ (self)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 

Data Fields

 data
 
 known_multi_fields
 
 multiple_keys
 

Detailed Description

A proxy object which wraps multidict types along with a matching schema
Whenever a value is looked up, it is checked against the schema to see if
there is a matching field where `is_multiple` is True. If there is, then
the data should be loaded as a list or tuple.

In all other cases, __getitem__ proxies directly to the input multidict.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  multidict,
ma.Schema  schema,
typing.Tuple[typing.Type, ...]   known_multi_fields = (             ma.fields.List,             ma.fields.Tuple,         ) 
)

Member Function Documentation

◆ __contains__()

def __contains__ (   self,
  x 
)

◆ __delitem__()

def __delitem__ (   self,
  key 
)

◆ __eq__()

def __eq__ (   self,
  other 
)

◆ __getattr__()

def __getattr__ (   self,
  name 
)

◆ __getitem__()

def __getitem__ (   self,
  key 
)

◆ __iter__()

def __iter__ (   self)

◆ __len__()

def __len__ (   self)

◆ __ne__()

def __ne__ (   self,
  other 
)

◆ __repr__()

def __repr__ (   self)

◆ __setitem__()

def __setitem__ (   self,
  key,
  value 
)

◆ __str__()

def __str__ (   self)

Field Documentation

◆ data

data

◆ known_multi_fields

known_multi_fields

◆ multiple_keys

multiple_keys

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