pasteur.module.ModuleClass

pasteur.module.ModuleClass#

class pasteur.module.ModuleClass(*args, _from_factory=False, **kwargs)[source]#

Modules which need to be instantiated multiple times extend from ModuleClass and define a Factory to act as their module.

For the module types provided by pasteur, you can call the classmethod get_factory(). get_factory() also acts as a closure, allowing you to provide parameters to the module’s init function.

Attributes

Methods

get_factory(*args, **kwargs)

Returns a factory that registers this module to the system.

classmethod get_factory(*args, **kwargs)[source]#

Returns a factory that registers this module to the system.

Any *args and **kwargs passed to this function will be saved and passed to the module’s __init__() method when calling build().

name: str#