Manager#

class sdgx.manager.Manager(*args, **kwargs)[source]#

Bases: object

Base class for all manager.

Manager is a singleton class for preventing multiple initialization.

Define following attributes in subclass:
  • register_type: Base class for registered class

  • project_name: Name of entry-point for extensio

  • hookspecs_model: Hook specification model(where @hookspec is defined)

For available managers, please refer to Plugin-supported modules

_load_dir(module)[source]#

Import all python files in a submodule.

_normalize_name(name: str) str[source]#
hookspecs_model = None#

Hook specification model(where @hookspec is defined)

init(c, **kwargs: dict[str, Any])[source]#

Init a new subclass of self.register_type.

Raises:
load_all_local_model()[source]#

Implement this function to load all local model

project_name: str = ''#

Name of entry-point for extension

property registed_cls: dict[str, type]#

Access all registed class.

Lazy load, only load once.

register(cls_name, cls: type)[source]#

Register a new model, if the model is already registed, skip it.

register_type#

Base class for registered class

alias of object