jvconnected.interfaces
Submodules
- class jvconnected.interfaces.Registry(*args, **kwargs)[source]
Bases:
DispatcherRegistry for interface modules
This is a singleton and should not be instanciated directly. Instead, it is accessed by
jvconnected.interfaces.registry:>>> from jvconnected.interfaces import registry, Interface >>> class MyInterfaceClass(Interface): >>> interface_name = 'my_interface' >>> registry.register(MyInterfaceClass) >>> for name, cls in registry: >>> print(name, cls.__name__) my_interface MyInterfaceClass
Subclasses of
Interfacemust have a unique name assigned as theirinterface_name. They can then be added using theregister()method.The
Enginethen instanciates them and adds them to itsinterfaces.- Events