4.1.8 pde.backends.registry module

Defines the registry for managing backends.

BackendRegistry

Class handling all backends and their configurations.

class BackendRegistry[source]

Bases: object

Class handling all backends and their configurations.

add(backend, *, link_config=True)[source]

Add a loaded backend object.

This object can replace a previously registered python package.

Parameters:
  • backend (BackendBase) – Implementation of the backend

  • link_config (bool) – If True, the configuration of backend is linked with the global configuration, so that both show consistent values

Return type:

None

get_config(name)[source]

Get configuration of a particular backend.

An empty configuration is returned if nothing was found.

Parameters:

name (str) – Name of the backend

Returns:

the configuration

Return type:

Config

register_package(name, package_path, *, config=None)[source]

Register a backend python package (without loading it yet)

Parameters:
  • name (str) – Name of the backend

  • package_path (str) – Import path for the package

  • config (list) – Configuration options for the package

Return type:

None

load_default_config(module_path)[source]

Load a default configuration from a module.

Parameters:

module_path (str) – String to the module to be loaded

Return type:

list[Parameter] | None

registered_backends()[source]

Returns all registered backends.

Return type:

list[str]