str: class name of the key or None if not available.
507594
def class_name(self):
    """"""
    if not self._registry_key and self._registry:
      self._GetKeyFromRegistry()

    if not self._registry_key:
      return None

    return self._registry_key.class_name
436258
def prnt(self):
        
        print("= = = =\n\n%s object key: \033[32m%s\033[0m" % (self.__class__.__name__, self.key))
        pprnt(self._data or self.clean_value())
746354
def get_info(cls):
        
        return '\n'.join(
            [str(cls._instances[key]) for key in cls._instances]
        )
357208
def primary_key(self):
    
    pkname = self.primary_key_name
    if pkname is None:
      return None
    elif isinstance(pkname, str):
      return getattr(self, pkname)
    else:
      return tuple((getattr(self, pkn) for pkn in pkname))
131370
def name(self):
        """"""
        if self._name_map is None:
            self._name_map = {}
            for key, value in self.__class__.__dict__.items():
                if isinstance(value, self.__class__):
                    self._name_map[value] = key
        return self._name_map[self]
700009
def get_classname(o):
    
    if inspect.isclass(o):
        target = o
    elif callable(o):
        target = o
    else:
        target = o.__class__
    try:
        return target.__qualname__
    except AttributeError:  # pragma: no cover
        return target.__name__
54892
def type_name(self) -> T.Optional[str]:
        """"""
        return self.args[1] if len(self.args) > 1 else None
735472
def get(self, key):
        
        keystr = str(key)
        res = None

        try:
            res = self.ctx[keystr]
        except KeyError:
            for k, v in self.ctx.items():
                if "name" in v and v["name"].lower() == keystr.lower():
                    res = v
                    break

        return res
265467
def get_object_key(self, key, using_name=True):
        
        try:
            if using_name:
                return self.o_name[key].key
            else:
                return self.o[key].key
        except KeyError:
            raise ValueError("'%s' are not found!" % key)
537986
def get(self, key, default=None):
        """"""
        if type(self.attrs) == dict:
            return self.attrs.get(key, default)
        else:
            raise NotImplementedError
493143
def getTypename(cls):
        '''
        
        '''
        if cls is Event:
            return None
        else:
            for c in cls.__bases__:
                if issubclass(c, Event):
                    if c is Event:
                        return cls._getTypename()
                    else:
                        return c.getTypename()
238191
def safe_repr(obj):
    
    name = getattr(obj, '__name__', getattr(obj.__class__, '__name__'))
    if name == 'ndict':
        name = 'dict'
    return name or repr(obj)
680985
def default_name(self, separator='-'):
        """"""
        return self.__class__.__name__ + '{}{:03d}'.format(
            separator, self._index+1)
971937
def get_key(self):
        
        event = self.get_event()
        if event and isinstance(event, KeyboardEvent):
            return event.key_code
        return None
78595
def _get_object_key(self, p_object):
        """"""
        matched_key = None
        matched_index = None

        if hasattr(p_object, self._searchNames[0]):
            return getattr(p_object, self._searchNames[0])

        for x in xrange(len(self._searchNames)):
            key = self._searchNames[x]
            if hasattr(p_object, key):
                matched_key = key
                matched_index = x

        if matched_key is None:
            raise KeyError()

        if matched_index != 0 and self._searchOptimize:
            self._searchNames.insert(0, self._searchNames.pop(matched_index))

        return getattr(p_object, matched_key)
1064149
def get (self, key, def_val=None):
        """"""
        assert isinstance(key, basestring)
        return dict.get(self, key.lower(), def_val)
557977
def get_model_from_key(key):
    """"""
    _known_models = {}
    model_name = key.split(':', 2)[0]
    # populate
    for klass in Model.__subclasses__():
        _known_models[klass.__name__] = klass
    return _known_models.get(model_name, None)