LSST Applications  22.0.1,22.0.1+01bcf6a671,22.0.1+046ee49490,22.0.1+05c7de27da,22.0.1+0c6914dbf6,22.0.1+1220d50b50,22.0.1+12fd109e95,22.0.1+1a1dd69893,22.0.1+1c910dc348,22.0.1+1ef34551f5,22.0.1+30170c3d08,22.0.1+39153823fd,22.0.1+611137eacc,22.0.1+771eb1e3e8,22.0.1+94e66cc9ed,22.0.1+9a075d06e2,22.0.1+a5ff6e246e,22.0.1+a7db719c1a,22.0.1+ba0d97e778,22.0.1+bfe1ee9056,22.0.1+c4e1e0358a,22.0.1+cc34b8281e,22.0.1+d640e2c0fa,22.0.1+d72a2e677a,22.0.1+d9a6b571bd,22.0.1+e485e9761b,22.0.1+ebe8d3385e
LSST Data Management Base Package
Classes | Functions | Variables
lsst.pipe.base.graph._loadHelpers Namespace Reference

Classes

class  RegistryDict
 
class  DefaultLoadHelper
 
class  S3LoadHelper
 
class  FileLoadHelper
 
class  OpenFileHandleHelper
 
class  LoadHelper
 

Functions

def register_helper (Union[Type[ButlerURI], Type[io.IO[bytes]]] URICLass)
 

Variables

 HELPER_REGISTRY = RegistryDict()
 

Function Documentation

◆ register_helper()

def lsst.pipe.base.graph._loadHelpers.register_helper ( Union[Type[ButlerURI], Type[io.IO[bytes]]]  URICLass)
Used to register classes as Load helpers

When decorating a class the parameter is the class of "handle type", i.e.
a ButlerURI type or open file handle that will be used to do the loading.
This is then associated with the decorated class such that when the
parameter type is used to load data, the appropriate helper to work with
that data type can be returned.

A decorator is used so that in theory someone could define another handler
in a different module and register it for use.

Parameters
----------
URIClass : Type of `~lsst.daf.butler.ButlerURI` or `~io.IO` of bytes
    type for which the decorated class should be mapped to

Definition at line 56 of file _loadHelpers.py.

56 def register_helper(URICLass: Union[Type[ButlerURI], Type[io.IO[bytes]]]):
57  """Used to register classes as Load helpers
58 
59  When decorating a class the parameter is the class of "handle type", i.e.
60  a ButlerURI type or open file handle that will be used to do the loading.
61  This is then associated with the decorated class such that when the
62  parameter type is used to load data, the appropriate helper to work with
63  that data type can be returned.
64 
65  A decorator is used so that in theory someone could define another handler
66  in a different module and register it for use.
67 
68  Parameters
69  ----------
70  URIClass : Type of `~lsst.daf.butler.ButlerURI` or `~io.IO` of bytes
71  type for which the decorated class should be mapped to
72  """
73  def wrapper(class_):
74  HELPER_REGISTRY[URICLass] = class_
75  return class_
76  return wrapper
77 
78 
def register_helper(Union[Type[ButlerURI], Type[io.IO[bytes]]] URICLass)
Definition: _loadHelpers.py:56

Variable Documentation

◆ HELPER_REGISTRY

lsst.pipe.base.graph._loadHelpers.HELPER_REGISTRY = RegistryDict()

Definition at line 53 of file _loadHelpers.py.