UnifiedGetRegistry#

class gwpy.io.registry.UnifiedGetRegistry[source]#

Bases: UnifiedFetchRegistry

Unified I/O registry for providing a multi-source .get() method.

Each registered reader should work with the target class as normal.

Each registered identified should return an iterable (generator) of keyword argument sets that should be tried, in order, to provide the necessary data.

See gwpy.timeseries.io.nds2 for a working example.

Attributes Summary

Methods Summary

identify_sources(source, ...)

Identify all valid sources for the given arguments.

Attributes Documentation

name = 'get'#

Methods Documentation

identify_sources(
source: str | Iterable[str | dict[str, Any]] | None,
data_class_required: type,
args: list[Any],
kwargs: dict,
) list[tuple[str, dict[str, Any]]][source]#

Identify all valid sources for the given arguments.

Unlike the standard registry identify_format method, this returns a list of dict, each of which should be tried in turn with the keyword arguments applied for each source.

This allows the Klass.get method to try multiple different sources to get some data.