Returns-->dict or None
762385
def __get_config():
    '''
    
    '''
    if 'config' not in globals():
        return None
    cfg = globals().get('config', None)
    if cfg is None:
        return None

    if not isinstance(cfg, dict):
        return None
    return cfg
384060
def nonull_dict(self):
        
        return {k: v for k, v in six.iteritems(self.dict) if v and k != '_codes'}
1019028
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'key') and self.key is not None:
            _dict['key'] = self.key._to_dict()
        if hasattr(self, 'value') and self.value is not None:
            _dict['value'] = self.value._to_dict()
        return _dict
761295
def to_dict(self, flat: bool=True) -> Dict[Any, Any]:
        
        if flat:
            return {key: value for key, value in self.items()}  # type: ignore
        else:
            return {key: self.getall(key) for key in self}
665990
def to_dict(self, omit=()):
        
        result = dict(self)
        for key in omit:
            if key in result:
                del result[key]
        return result
777321
def get_object_or_none(model, *args, **kwargs):
    
    try:
        return model._default_manager.get(*args, **kwargs)
    except model.DoesNotExist:
        return None
221876
def get_dicts(self):
        
        if self.word_dict is None:
            self.word_dict, self.char_dict, self.max_word_len = self.dict_generator(return_dict=True)
        return self.word_dict, self.char_dict
562733
def _default_dict(self):
        """"""
        options = {}
        for attr, _, _, default, multi, _ in self._optiondict.values():
            if multi and default is None:
                options[attr] = []
            else:
                options[attr] = default
        return options
406252
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'available') and self.available is not None:
            _dict['available'] = self.available
        if hasattr(self,
                   'maximum_allowed') and self.maximum_allowed is not None:
            _dict['maximum_allowed'] = self.maximum_allowed
        return _dict
1046154
def remove_None(params: dict):
    """"""
    return {
        key: value
        for key, value in params.items()
        if value is not None
    }
743093
def return_type(self):
        
        returns = self.returns
        if returns:
            return [r.type for r in returns]
        return None
870258
def get_dict(self):
        
        return {'hostname': self.get_name(),
                'address':  self.get_address(),
                'protocol': self.get_protocol(),
                'port':     self.get_tcp_port()}
121359
def _to_dict(self):
        """"""
        _dict = {}
        if hasattr(self, 'model') and self.model is not None:
            _dict['model'] = self.model
        return _dict
994994
def get_values(self):
        
        return_dict = {}
        for i,ctrl in enumerate(self.list_ctrls):
            if hasattr(self.parse_funcs,'__getitem__') and len(self.parse_funcs)>i and hasattr(self.parse_funcs[i],'__call__'):
                try: return_dict[self.inputs[i]] = self.parse_funcs[i](ctrl.GetValue())
                except: return_dict[self.inputs[i]] = ctrl.GetValue()
            else:
                return_dict[self.inputs[i]] = ctrl.GetValue()
        return ('' not in list(return_dict.values()), return_dict)
415544
def to_dict(self):
        
        return dict((k, str(self.get(k))) for k in self.raw_dict)
1255194
def to_dict(self):
        
        result = {}
        for name in self.__dict__:
            if name.startswith("_"):
                continue

            key = name.replace("_", "-")
            attr = getattr(self, name)
            result[key] = attr.to_dict() if hasattr(attr, "to_dict") else attr

        return result
217064
def _drop_none_values(dictionary: Dict) -> Dict:
    
    return {key: value for key, value in dictionary.items() if value is not None}