ButlerURI¶
- 
class lsst.daf.butler.ButlerURI(uri, root=None, forceAbsolute=True)¶
- Bases: - object- Convenience wrapper around URI parsers. - Provides access to URI components and can convert file paths into absolute path URIs. Scheme-less URIs are treated as if they are local file system paths and are converted to absolute URIs. - Parameters: - uri : strorurllib.parse.ParseResult
- URI in string form. Can be scheme-less if referring to a local filesystem path. 
- root : str, optional
- When fixing up a relative path in a - filescheme or if scheme-less, use this as the root. Must be absolute. If- Nonethe current working directory will be used.
- forceAbsolute : bool, optional
- If - True, scheme-less relative URI will be converted to an absolute path using a- filescheme. If- Falsescheme-less URI will remain scheme-less and will not be updated to- fileor absolute path.
 - Attributes Summary - fragment- The fragment component of the URI. - netloc- The URI network location. - ospath- Path component of the URI localized to current OS. - params- Any parameters included in the URI. - path- The path component of the URI. - query- Any query strings included in the URI. - relativeToPathRoot- Returns path relative to network location. - scheme- The URI scheme ( - ://is not part of the scheme).- Methods Summary - geturl()- Return the URI in string form. - replace(**kwargs)- Replace components in a URI with new values and return a new instance. - updateFile(newfile)- Update in place the final component of the path with the supplied file name. - Attributes Documentation - 
fragment¶
- The fragment component of the URI. 
 - 
netloc¶
- The URI network location. 
 - 
ospath¶
- Path component of the URI localized to current OS. 
 - 
params¶
- Any parameters included in the URI. 
 - 
path¶
- The path component of the URI. 
 - 
query¶
- Any query strings included in the URI. 
 - 
relativeToPathRoot¶
- Returns path relative to network location. - Effectively, this is the path property with posix separator stripped from the left hand side of the path. 
 - 
scheme¶
- The URI scheme ( - ://is not part of the scheme).
 - Methods Documentation - 
replace(**kwargs)¶
- Replace components in a URI with new values and return a new instance. - Returns: 
 
- uri :