woob.core.backendscfg

exception woob.core.backendscfg.BackendAlreadyExists

Bases: Exception

class woob.core.backendscfg.BackendsConfig(confpath)

Bases: object

Config of backends.

A backend is an instance of a module with a config. A module can thus have multiple instances.

exception WrongPermissions

Bases: Exception

add_backend(backend_name, module_name, params)

Add a backend to config.

Parameters
  • backend_name – name of the backend in config

  • module_name – name of the Python submodule to run

  • params (dict) – params to pass to the module

backend_exists(name)

Return True if the backend exists in config.

edit_backend(backend_name, params)

Edit a backend from config.

Parameters
  • backend_name – name of the backend in config

  • params (dict) – params to change

get_backend(backend_name)

Get options of backend.

Returns

a tuple with the module name and the module options dict

Return type

tuple

iter_backends()

Iterate on backends.

Returns

each tuple contains the backend name, module name and module options

Return type

tuple

remove_backend(backend_name)

Remove a backend from config.