woob.core.backendscfg

class BackendsConfig(confpath)[source]

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[source]

Bases: Exception

iter_backends()[source]

Iterate on backends.

Returns

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

Return type

tuple

backend_exists(name)[source]

Return True if the backend exists in config.

add_backend(backend_name, module_name, params)[source]

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

edit_backend(backend_name, params)[source]

Edit a backend from config.

Parameters
  • backend_name – name of the backend in config

  • params (dict) – params to change

get_backend(backend_name)[source]

Get options of backend.

Returns

a tuple with the module name and the module options dict

Return type

tuple

remove_backend(backend_name)[source]

Remove a backend from config.

exception BackendAlreadyExists[source]

Bases: Exception