MODULE REFERENCE

platform

anomx.data.sources.platform

Dataset API semantics, kept separate from the generic HTTP transport.

PlatformDatasetClient

PlatformDatasetClient(client: PlatformClient, *, channels_path: str | None = None)

Adapt a generic PlatformClient to the data domain's DatasetClient contract.

Dataset resolution, versioned batches, channel loading, and response shapes belong here. The HTTP client only sends requests. Both unversioned /api and grouped /api/v1 routes are supported.

Signature parameters
ParameterTypeDefault
clientPlatformClientrequired
channels_pathkeyword onlystr | NoneNone

Members

cache_namespaceproperty
cache_namespace: str

Partition cached data by server and authorization, without storing a token.

Returns str

describe_datasetmethod
describe_dataset(reference: str) -> dict[str, Any]

Resolve a dataset definition without loading its observations.

Signature parameters
ParameterTypeDefault
referencestrrequired

Returns dict[str, Any]

describe_dataset_selectionmethod
describe_dataset_selection(reference: str, *, selection: dict[str, Any]) -> dict[str, Any]

Resolve a server-filtered view and require explicit host support.

Older servers may ignore unknown query arguments. Never accept such a response as a filtered dataset: the capability and effective selection must be present before any observation request is sent.

Signature parameters
ParameterTypeDefault
referencestrrequired
selectionkeyword onlydict[str, Any]required

Returns dict[str, Any]

dataset_sourcesmethod
dataset_sources(reference: str, *, version: str, offset: int = 0, limit: int = 100) -> dict[str, Any]

Read one page of pinned source metadata, including named variables.

Signature parameters
ParameterTypeDefault
referencestrrequired
versionkeyword onlystrrequired
offsetkeyword onlyint0
limitkeyword onlyint100

Returns dict[str, Any]

read_datasetmethod
read_dataset(reference: str, *, version: str, cursor: str | None = None, limit: int = 5000) -> dict[str, Any]

Read a bounded batch pinned to an explicitly resolved source version.

Signature parameters
ParameterTypeDefault
referencestrrequired
versionkeyword onlystrrequired
cursorkeyword onlystr | NoneNone
limitkeyword onlyint5000

Returns dict[str, Any]

load_channelsmethod
load_channels(channels: Sequence[str], *, start: str | None = None, end: str | None = None, frequency: str | None = None) -> object

Load aligned channel records using the data domain's channel endpoint.

Signature parameters
ParameterTypeDefault
channelsSequence[str]required
startkeyword onlystr | NoneNone
endkeyword onlystr | NoneNone
frequencykeyword onlystr | NoneNone

Returns object