resolve_example_uri

function of dascore.utils.downloader source

resolve_example_uri(
    resource: None ,
)-> ’_T | Path’

Resolve an examples://{name} URI to a local path.

Parameters

Parameter Description
resource Any resource. Anything which is not an example URI is returned
unchanged so call sites need no branch of their own.

Returns

A path to the downloaded file, or the unmodified resource.

Raises

UnknownExampleError if the name is not a file in the data registry.

Examples

from dascore.utils.downloader import resolve_example_uri
path = resolve_example_uri("examples://terra15_das_1_trimmed.hdf5")
path.exists()
True