Skip to content

Manifest

timenet.manifest source

The dataset manifest: a frozen :class:Manifest and its JSON codec.

BuildEnvironment source

Bases: TypedDict

Build-provenance fields recorded in a manifest.

packages instance-attribute source

packages: dict[StrictStr, StrictStr]

python instance-attribute source

python: StrictStr

FilePart source

Bases: TimeFModel

One data file of a dataset version. It has a path, a checksum, and a byte size in one record.

The path, checksum, and size stay together in one record. A reader does not need to join a file to its digest across two structures. A consumer can verify integrity and plan a download from the manifest alone.

checksum instance-attribute source

checksum: Checksum

The digest of the file, with a sha256: prefix.

model_config class-attribute instance-attribute source

model_config = ConfigDict(
    extra="forbid",
    frozen=True,
    revalidate_instances="always",
    serialize_by_alias=True,
    validate_by_name=True,
    validate_default=True,
)

path instance-attribute source

path: _ManifestPath

The version-relative POSIX path to the file.

size instance-attribute source

size: StrictNonNegativeInt

The size of the file, in bytes.

Manifest source

Bases: TimeFModel

The single source of truth a consumer reads to interpret a dataset version.

build_env class-attribute instance-attribute source

build_env: BuildEnvironment = Field(default_factory=dict)

The Python version and package set that produced this version.

counts class-attribute instance-attribute source

counts: ManifestCounts = Field(
    default_factory=ManifestCounts
)

Row and entity counts recorded for quick inspection.

dataset_id instance-attribute source

dataset_id: DatasetId

A denormalized copy of metadata.dataset_id.

dataset_schema class-attribute instance-attribute source

dataset_schema: Annotated[
    DatasetSchema, Field(alias=schema)
] = Field(default_factory=DatasetSchema)

Structural schema: time-series specs, annotations, and tasks.

files instance-attribute source

Descriptor for every data artifact, grouped by kind.

lineage class-attribute instance-attribute source

lineage: tuple[ParentDatasetCard, ...] = ()

Flattened provenance snapshots; never traversed to read data.

metadata instance-attribute source

metadata: DatasetMetadata

Descriptive identity of the dataset.

model_config class-attribute instance-attribute source

model_config = ConfigDict(
    extra="forbid",
    frozen=True,
    revalidate_instances="always",
    serialize_by_alias=True,
    validate_by_name=True,
    validate_default=True,
)

parent_cards class-attribute instance-attribute source

parent_cards: dict[ParentAlias, ParentDatasetCard] = Field(
    default_factory=dict
)

Copies of the cards of the declared parents, indexed by parent alias.

payload_sources class-attribute instance-attribute source

payload_sources: dict[SourceKeyField, PayloadSource] = (
    Field(default_factory=dict)
)

Every release that stores a payload file this release reads, by source key, pinned to those files. The writer flattens them, so a source's own sources are not listed unless this release reads their files too.

timef_format_version instance-attribute source

timef_format_version: Annotated[
    int, Field(strict=True, ge=1, le=1)
]

The TimeF manifest format version.

value_encoding class-attribute instance-attribute source

value_encoding: dict[StrictStr, ValueEncoding] = Field(
    default_factory=dict
)

spec_type to the values-column encoding used by its shards.

values_backend class-attribute instance-attribute source

Storage backend for the time-series values plane.

to_dict source

to_dict() -> dict[str, Any]

Serialize the manifest to a validated JSON-compatible dict with all keys present.

Returns:

Type Description
dict[str, Any]

The canonical dict form.

to_json source

to_json() -> str

Serialize the manifest to a pretty JSON string.

Returns:

Type Description
str

The JSON text.

ManifestCounts source

Bases: TimeFModel

TimeF entity counts recorded for inspection without opening DuckDB.

annotation_contents class-attribute instance-attribute source

annotation_contents: StrictNonNegativeInt = 0

Number of reusable annotation content items.

annotation_occurrences class-attribute instance-attribute source

annotation_occurrences: StrictNonNegativeInt = 0

Number of annotation attachments across all object types.

axes class-attribute instance-attribute source

axes: StrictNonNegativeInt = 0

Number of distinct shared TimeAxes.

model_config class-attribute instance-attribute source

model_config = ConfigDict(
    extra="forbid",
    frozen=True,
    revalidate_instances="always",
    serialize_by_alias=True,
    validate_by_name=True,
    validate_default=True,
)

records class-attribute instance-attribute source

records: StrictNonNegativeInt = 0

Total number of records in the dataset.

signal_chunks class-attribute instance-attribute source

signal_chunks: StrictNonNegativeInt = 0

Number of Signal chunk placements in the values plane.

signals class-attribute instance-attribute source

signals: StrictNonNegativeInt = 0

Total number of Signals.

signals_by_spec class-attribute instance-attribute source

signals_by_spec: dict[StrictStr, StrictNonNegativeInt] = (
    Field(default_factory=dict)
)

Signal count keyed by specification type.

sources class-attribute instance-attribute source

sources: StrictNonNegativeInt = 0

Total number of Sources at every recursion depth.

tasks class-attribute instance-attribute source

tasks: dict[StrictStr, StrictNonNegativeInt] = Field(
    default_factory=dict
)

Count of tasks keyed by task type.

ManifestFiles source

Bases: TimeFModel

Descriptors for every TimeF artifact. Readers use this data rather than a file glob.

control instance-attribute source

control: ControlParts

The single immutable control.duckdb file.

model_config class-attribute instance-attribute source

model_config = ConfigDict(
    extra="forbid",
    frozen=True,
    revalidate_instances="always",
    serialize_by_alias=True,
    validate_by_name=True,
    validate_default=True,
)

payloads class-attribute instance-attribute source

payloads: tuple[FilePart, ...] = ()

Packed large text, string lists, and irregular time offsets.

time_series class-attribute instance-attribute source

time_series: tuple[FilePart, ...] = ()

Parquet shards or files inside the Zarr values store.

all_files source

all_files() -> tuple[FilePart, ...]

Return every file descriptor across all artifacts, in a stable order.

Returns:

Type Description
tuple[FilePart, ...]

The control file followed by every values-plane artifact.

all_parts source

all_parts() -> tuple[str, ...]

Return the version-relative path of every file, in the same order as :meth:all_files.

Returns:

Type Description
str

The path of every file. Use this when you only need to find the files, for example to

...

download them.

PayloadSource source

Bases: TimeFModel

A release whose payload files this release reads, pinned to the files it reuses.

The pins copy the source's own manifest records, so checking that the source is still the release this one was written against needs only the two manifests, no hashing.

files instance-attribute source

files: Annotated[tuple[FilePart, ...], Field(min_length=1)]

The source's manifest records for the files this release reads, in path order.

model_config class-attribute instance-attribute source

model_config = ConfigDict(
    extra="forbid",
    frozen=True,
    revalidate_instances="always",
    serialize_by_alias=True,
    validate_by_name=True,
    validate_default=True,
)

release instance-attribute source

release: DatasetRef

The exact release that stores the files.