The Woob class

class Woob(workdir: Optional[str] = None, datadir: Optional[str] = None, backends_filename: Optional[str] = None, scheduler: Optional[IScheduler] = None, storage: Optional[IStorage] = None)[source]

Bases: WoobBase

The main class of Woob, used to manage backends, modules repositories and call methods on all loaded backends.

  • workdir (str) – optional parameter to set path of the working directory

  • datadir (str) – optional parameter to set path of the data directory

  • backends_filename (str) – name of the backends file, where configuration of backends is stored

  • storage ( – provide a storage where backends can save data

build_modules_loader() RepositoryModulesLoader[source]

Build the module loader for the current application.

Return type


update(progress: ~woob.core.repositories.IProgress = <PrintProgress>)[source]

Update modules from repositories.


progress (IProgress) – object notified when there is a progress

build_backend(module_name: str, params: Optional[Dict[str, str]] = None, storage: Optional[IStorage] = None, name: Optional[str] = None, nofail: Optional[bool] = False) Module[source]

Create a single backend which is not listed in configuration.

  • module_name (str) – name of module

  • params (dict) – parameters to give to backend

  • storage ( – storage to use

  • name (str) – name of backend

  • nofail (bool) – if true, this call can’t fail

Return type

load_backends(caps: Optional[List[Union[Capability, str]]] = None, names: Optional[List[str]] = None, modules: Optional[List[str]] = None, exclude: Optional[List[str]] = None, storage: Optional[IStorage] = None, errors: Optional[List[LoadError]] = None) Dict[str, Module][source]

Load backends listed in config file.

  • caps (tuple[woob.capabilities.base.Capability]) – load backends which implement all of specified caps

  • names (tuple[str]) – load backends in list

  • modules (tuple[str]) – load backends which module is in list

  • exclude (tuple[str]) – do not load backends in list

  • storage ( – use this storage if specified

  • errors (list[LoadError]) – if specified, store every errors in this list


loaded backends

Return type


load_or_install_module(module_name: str) Module[source]

Load a backend, and install it if not done before