Implements an butler framework interface for Transport, Storage, and Registry
.. warning::
Access is 'wet paint' and very likely to change. Use of it in production
code other than via the 'old butler' API is strongly discouraged.
Definition at line 37 of file access.py.
def lsst.daf.persistence.access.Access.exists |
( |
|
self, |
|
|
|
location |
|
) |
| |
Query if a location exists.
As of this writing the only storage type is PosixStorage, and it works to say that 'location' is a
simple locaiton descriptor. In the case of PosixStorage that's a path. If this needs to become more
complex it could be changed to be a butlerLocation, or something else, as needed.
:param location: a simple location descriptor, type is dependent on Storage.
:return: True if location exists, else False.
Definition at line 126 of file access.py.
126 def exists(self, location):
127 """Query if a location exists. 129 As of this writing the only storage type is PosixStorage, and it works to say that 'location' is a 130 simple locaiton descriptor. In the case of PosixStorage that's a path. If this needs to become more 131 complex it could be changed to be a butlerLocation, or something else, as needed. 132 :param location: a simple location descriptor, type is dependent on Storage. 133 :return: True if location exists, else False. 135 return self.storage.exists(location)
def lsst.daf.persistence.access.Access.lookup |
( |
|
self, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
Perform a lookup in the registry.
Returns a list of dataId for each valid lookup (right? TODO VERIFY)
Definition at line 137 of file access.py.
137 def lookup(self, *args, **kwargs):
138 """Perform a lookup in the registry. 140 Returns a list of dataId for each valid lookup (right? TODO VERIFY)""" 141 return self.storage.lookup(*args, **kwargs)
◆ mapperClass()
def lsst.daf.persistence.access.Access.mapperClass |
( |
|
self | ) |
|
Get the mapper class associated with a repository root.
:return: the mapper class
Definition at line 68 of file access.py.
68 def mapperClass(self):
69 """Get the mapper class associated with a repository root. 71 :return: the mapper class 73 return self.storage.mapperClass()
◆ read()
def lsst.daf.persistence.access.Access.read |
( |
|
self, |
|
|
|
butlerLocation |
|
) |
| |
Reads an object from storage
:param butlerLocation: describes the location & how to load the object.
:return:
Definition at line 118 of file access.py.
118 def read(self, butlerLocation):
119 """Reads an object from storage 121 :param butlerLocation: describes the location & how to load the object. 124 return self.storage.read(butlerLocation=butlerLocation)
◆ root()
def lsst.daf.persistence.access.Access.root |
( |
|
self | ) |
|
Get the repository root as defined by the Storage class, this refers to the 'top' of a persisted
repository. The exact type of Root can vary based on Storage type.
:return: the root of the persisted repository.
Definition at line 75 of file access.py.
76 """Get the repository root as defined by the Storage class, this refers to the 'top' of a persisted 77 repository. The exact type of Root can vary based on Storage type. 79 :return: the root of the persisted repository. 82 return self.storage.root
◆ setCfg()
def lsst.daf.persistence.access.Access.setCfg |
( |
|
self, |
|
|
|
repoCfg |
|
) |
| |
Writes the repository configuration to Storage.
:param repoCfg: the Policy cfg to be written
:return: None
Definition at line 94 of file access.py.
94 def setCfg(self, repoCfg):
95 """Writes the repository configuration to Storage. 97 :param repoCfg: the Policy cfg to be written 100 self.storage.setCfg(repoCfg)
◆ write()
def lsst.daf.persistence.access.Access.write |
( |
|
self, |
|
|
|
butlerLocation, |
|
|
|
obj |
|
) |
| |
Passes an object to Storage to be written into the repository.
:param butlerLocation: the location & formatting for the object to be written.
:param obj: the object to be written.
:return: None
Definition at line 109 of file access.py.
109 def write(self, butlerLocation, obj):
110 """Passes an object to Storage to be written into the repository. 112 :param butlerLocation: the location & formatting for the object to be written. 113 :param obj: the object to be written. 116 self.storage.write(butlerLocation, obj)
◆ storage
lsst.daf.persistence.access.Access.storage |
The documentation for this class was generated from the following file:
- /j/snowflake/release/lsstsw/stack/Linux64/daf_persistence/18.1.0/python/lsst/daf/persistence/access.py