dantro.data_loaders._tools module

Implements common tools of loader functions, including a decorator to ensure correct loader function signature.

dantro.data_loaders._tools.add_loader(*, TargetCls: type, omit_self: bool = True)[source]

This decorator should be used to specify loader functions.

Parameters
  • TargetCls – The return type of the load function. This is stored as an attribute of the decorated function.

  • omit_self (bool, optional) – If True (default), the decorated method will not be supplied with the self object instance, thus being equivalent to a class method.