Return the dependencies as a dictionary.

        Returns:
            dict: dictionary of dependencies.
775915
def as_dict(self, absolute=False):
        
        return {
            'name': self.absolute_name() if absolute else self.name,
            'path': self.path,
            'dependencies': [{
                # 'source': d.source.absolute_name(),  # redundant
                'target': d.target if d.external else d.target.absolute_name(),
                'lineno': d.lineno,
                'what': d.what,
                'external': d.external
            } for d in self.dependencies]
        }
1254404
def to_dict(self):
        

        out_dict = {}

        out_dict['commands'] = self.commands
        out_dict['configs'] = self.configs
        out_dict['short_name'] = self.name
        out_dict['versions'] = {
            'module': self.module_version,
            'api': self.api_version
        }

        return out_dict
807884
def as_dict(self):
        

        d = {"@module": self.__class__.__module__,
             "@class": self.__class__.__name__}
        d["structure"] = self.structure
        d["energy"] = self.energy
        d["miller_index"] = self.miller_index
        d["label"] = self.label
        d["coverage"] = self.coverage
        d["adsorbates"] = self.adsorbates
        d["clean_entry"] = self.clean_entry

        return d
200170
def _get_dependencies(self):
        
        #The only complication with the whole process is that we need to get the list of
        #dependencies for the current module. For full lib, we compile *all* the files in
        #the directory, otherwise only those that are explicitly required.
        from os import path
        modules = self.module.search_dependencies()
        result = {}
        for module in modules:
            self.module.parent.load_dependency(module, True, True, False)
            
        for modname, module in list(self.module.parent.modules.items()):
            pathkey = path.dirname(module.filepath).lower()
            if pathkey not in result:
                result[pathkey] = path.dirname(module.filepath)

        return result
1067292
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'available') and self.available is not None:
            _dict['available'] = self.available
        if hasattr(self, 'processing') and self.processing is not None:
            _dict['processing'] = self.processing
        if hasattr(self, 'failed') and self.failed is not None:
            _dict['failed'] = self.failed
        if hasattr(self, 'pending') and self.pending is not None:
            _dict['pending'] = self.pending
        return _dict
121359
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'model') and self.model is not None:
            _dict['model'] = self.model
        return _dict
590765
def to_dict(self):
        
        return {k: getattr(self, k) for k in filter(
            lambda k: not k.startswith('_') and k != 'to_dict', dir(self))}
676649
def to_dict(self):
        
        data = dict()

        for key, value in self.__dict__.items():
            if value:
                if hasattr(value, 'to_dict'):
                    data[key] = value.to_dict()
                else:
                    data[key] = value

        return data
224210
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'exclude') and self.exclude is not None:
            _dict['exclude'] = self.exclude
        if hasattr(self, 'include') and self.include is not None:
            _dict['include'] = self.include
        return _dict
1007247
def get_dependencies(self):
        """"""
        # pylint: disable=no-member
        return super().get_dependencies() + [
            Data.collection_set,
            Data.entity_set,
            Data.parents,
        ]
900606
def to_dict(self):
        
        out_dict = dict(self)
        for k, v in out_dict.items():
            if v is self:
                out_dict[k] = out_dict
            elif hasattr(v, 'to_dict'):
                out_dict[k] = v.to_dict()
            elif hasattr(v, 'to_list'):
                out_dict[k] = v.to_list()
        return out_dict
1261536
def needs(self):
        """"""
        result = []
        for dep in self.dependencies:
            module = dep.split(".")[0].lower()
            if module not in result:
                result.append(module)

        return result
42600
def to_dict(self):
        """"""
        # FIXME remove 'id' dependency from invenio modules
        return {'id': self.m_key + "_" + str(self.id_knwKB),
                'key': self.m_key,
                'value': self.m_value,
                'kbid': self.kb.id if self.kb else None,
                'kbname': self.kb.name if self.kb else None}
270020
def list_dependencies(self, module, result):
        """"""
        if result is None:
            result = {}
        #We will try at least once to load each module that we don't have
        if module not in self.modules:
            self.load_dependency(module, True, True, False)

        if module in self.modules and module not in result:
            result[module] = self.modules[module].filepath
            for depend in self.modules[module].dependencies:
                name = depend.split(".")[0].lower()
                if name not in result:
                    self.list_dependencies(name, result)

        return result
997009
def to_dict(self):
        
        return {
            'name': self.name,
            'broker': self.broker.to_dict(),
            'pid': self.pid,
            'process_pids': self.process_pids,
            'concurrency': self.concurrency,
            'job_count': self.job_count,
            'queues': [q.to_dict() for q in self.queues]
        }
26012
def to_dict(self):
        
        if self._dict is not None:
            return self._dict

        result = {}
        for key in self.ATTRIBUTES:
            value = getattr(self, key)
            if value:
                result[key] = value
        self._dict = result
        return result
1287153
def to_dict(self):
        
        self_dict = {}
        for key, value in six.iteritems(self.__dict__):
            if self.allowed_params and key in self.allowed_params:
                self_dict[key] = value
        return self_dict