This function returns a dictionary with the attributes that will be
        put in the mongodb document to facilitate the query.
        Subclasses may want to replace or extend the default behaviour.
775179
def get_dict_for_mongodb_queries(self):
        
        d = {}
        return d
        # TODO
        all_structures = [task.input.structure for task in self.iflat_tasks()]
        all_pseudos = [task.input.pseudos for task in self.iflat_tasks()]
882083
def fields(self):
        
        if 'feature' in self._dict:
            self._attributes = self._dict['feature']['attributes']
        else:
            self._attributes = self._dict['attributes']
        return self._attributes.keys()
1226274
def serialize(self):
        """"""
        data = {'doc': self.doc}
        if isinstance(self.query, Query):
            data['query'] = self.query.serialize()
        return data
866818
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'document') and self.document is not None:
            _dict['document'] = self.document
        if hasattr(self, 'targets') and self.targets is not None:
            _dict['targets'] = self.targets
        return _dict
1064219
def as_dict(self):
        
        info = {}
        info["type"] = self.__class__.__name__
        info["help"] = self.help
        info["default"] = self.default
        info["multi"] = self.multi
        info["uniq"] = self.uniq
        info["choices"] = self.choices
        # TODO appel rec sur les attrs
        #info["attrs"] = self.attrs
        return info
957572
def asDictionary(self):
        
        template =  {
            "type": "dataLayer",
            "dataSource": self._dataSource
        }
        if not self._fields is None:
            template['fields'] = self._fields
        return template
462585
def dict(self):
        
        d = {p.key: getattr(self, p.key) for p in self.__mapper__.attrs
             if p.key not in ('contents', 'dataset')}

        d['modified_datetime'] = self.modified_datetime
        d['modified_ago'] = self.modified_ago

        return d
293708
def to_dict(self):
        
        return dict(
            (attr, getattr(self, attr))
            for attr in self.ATTRIBUTES
            if hasattr(self, attr)
        )
578351
def from_dict(document):
        
        if 'default' in document:
            default = document['default']
        else:
            default = None
        return AttributeDefinition(
            document['id'],
            document['name'],
            document['description'],
            AttributeType.from_dict(document['type']),
            default=default
        )
1325356
def attributes(self):
        
        if not self._attribute_pages:
            self.fetch_attributes()
        result = {}
        for page in self._attribute_pages.values():
            result.update(page.attributes)
        return result
508350
def to_dict(self):
        
        return {
            inflection.camelize(k, False): v
            for k, v in self.__dict__.items()
            if v
        }
1055708
def as_dict(self):
        
        self.clean()
        d = OrderedDict()
        all_props = self.__class__.CONFIG_PROPERTIES
        for attr_name, attr_config in six.iteritems(all_props):
            value = self._config[attr_name]
            attr_type = attr_config.attr_type
            if attr_type:
                if value:
                    if issubclass(attr_type, list):
                        if issubclass(attr_type, NamedTupleList):
                            d[attr_name] = [i._asdict() for i in value]
                        else:
                            d[attr_name] = value[:]
                    elif attr_type is dict:
                        d[attr_name] = dict(value)
            elif value is not NotSet:
                d[attr_name] = value
        return d
29925
def _dict_to_bson(doc, check_keys, opts, top_level=True):
    """"""
    if _raw_document_class(doc):
        return doc.raw
    try:
        elements = []
        if top_level and "_id" in doc:
            elements.append(_name_value_to_bson(b"_id\x00", doc["_id"],
                                                check_keys, opts))
        for (key, value) in iteritems(doc):
            if not top_level or key != "_id":
                elements.append(_element_to_bson(key, value,
                                                 check_keys, opts))
    except AttributeError:
        raise TypeError("encoder expected a mapping type but got: %r" % (doc,))

    encoded = b"".join(elements)
    return _PACK_INT(len(encoded) + 5) + encoded + b"\x00"
1011396
def to_dict(self):
        
        doc = {
            'filename' : self.filename,
            'mimeType' : self.mime_type
        }
        # Add path if present
        if self.filename != self.path:
            doc['path'] = self.path
        return doc
700185
def to_dict(self):
        
        schema = super(Schema, self).to_dict()
        schema['$schema'] = "http://json-schema.org/draft-04/schema#"
        if self._id:
            schema['id'] = self._id
        if self._desc:
            schema['description'] = self._desc
        return schema
735446
def get_document_models():
    """"""
    mappings = {}
    for i in get_index_names():
        for m in get_index_models(i):
            key = "%s.%s" % (i, m._meta.model_name)
            mappings[key] = m
    return mappings
656464
def to_dict(self) -> dict:
        ''''''

        return {
            "version": self.version,
            "description": self.description,
            "count_mode": self.count_mode,
            "start_block": self.start_block,
            "end_block": self.end_block,
            "choices": self.choices,
            "vote_metainfo": self.vote_metainfo
        }