Package logilab :: Package common :: Module registry :: Class RegistrableObject
[frames] | no frames]

Class RegistrableObject

source code

object --+
         |
        RegistrableObject

This is the base class for registrable objects which are selected
according to a context.

:attr:`__registry__`
  name of the registry for this object (string like 'views',
  'templates'...). You may want to define `__registries__` directly if your
  object should be registered in several registries.

:attr:`__regid__`
  object's identifier in the registry (string like 'main',
  'primary', 'folder_box')

:attr:`__select__`
  class'selector

Moreover, the `__abstract__` attribute may be set to True to indicate that a
class is abstract and should not be registered.

You don't have to inherit from this class to put it in a registry (having
`__regid__` and `__select__` is enough), though this is needed for classes
that should be automatically registered.

Instance Methods
 
__registries__(cls) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __registry__ = None
hash(x)
  __regid__ = None
hash(x)
  __select__ = None
hash(x)
  __abstract__ = True
Properties

Inherited from object: __class__

Method Details

__registries__(cls)

source code 
Decorators:
  • @classproperty