Skip to content

API reference / Archive, sampling contract and types

tsdive.Source

Bases: Protocol

A read-only window provider over process time series.

Methods:

Name Description
list_tags

Every tag identity this source can answer for.

read_window

Return the window's samples plus its data-physics block.

list_tags

list_tags() -> list[TagIdentity]

Every tag identity this source can answer for.

read_window

read_window(
    identity: TagIdentity,
    start: datetime,
    end: datetime,
    contract: SamplingContract,
    *,
    min_severity: Severity = Severity.GOOD,
    tz_names: tuple[str, ...] = (),
) -> Window

Return the window's samples plus its data-physics block.

contract is positional and required: a read that does not state how its numbers were produced is not a read this library returns.