Location¶
-
class
lsst.daf.butler.Location(datastoreRootUri: Union[None, lsst.daf.butler.core._butlerUri._butlerUri.ButlerURI, str], path: Union[lsst.daf.butler.core._butlerUri._butlerUri.ButlerURI, str])¶ Bases:
objectIdentifies a location within the
Datastore.Parameters: - datastoreRootUri :
ButlerURIorstrorNone Base URI for this datastore, must include an absolute path. If
Nonethepathmust correspond to an absolute URI.- path :
ButlerURIorstr Relative path within datastore. Assumed to be using the local path separator if a
filescheme is being used for the URI, else a POSIX separator. Can be a full URI if the root URI isNone. Can also be a schemeless URI if it refers to a relative path.
Attributes Summary
netlocThe URI network location. pathPath corresponding to location. pathInStorePath corresponding to location relative to Datastoreroot.relativeToPathRootReturns the path component of the URI relative to the network location. uriURI corresponding to fully-specified location in datastore. Methods Summary
getExtension()Return the file extension(s) associated with this location. updateExtension(ext)Update the file extension associated with this Location.Attributes Documentation
-
netloc¶ The URI network location.
-
path¶ Path corresponding to location.
This path includes the root of the
Datastore, but does not include non-path components of the root URI. Paths will not include URI quoting. If a file URI scheme is being used the path will be returned with the local OS path separator.
-
pathInStore¶ Path corresponding to location relative to
Datastoreroot.Uses the same path separator as supplied to the object constructor. Can be an absolute URI if that is how the location was configured.
-
relativeToPathRoot¶ Returns the path component of the URI relative to the network location.
Effectively, this is the path property with POSIX separator stripped from the left hand side of the path. Will be unquoted.
-
uri¶ URI corresponding to fully-specified location in datastore.
Methods Documentation
- datastoreRootUri :