icechunk.snapshots#
Snapshot metadata: diffs, snapshot info, and manifest file info.
icechunk.snapshots #
Classes:
| Name | Description |
|---|---|
AncestryGraph | A visual representation of commit history. |
Diff | The result of comparing two snapshots |
ManifestFileInfo | Manifest file metadata |
SnapshotInfo | Metadata for a snapshot |
AncestryGraph #
A visual representation of commit history.
Use print() for colored Unicode output in a terminal, or display in Jupyter for an SVG diagram. Pass plain=True to ancestry_graph() for output without colors (useful for CI, files, or LLM agents).
Note: only commits reachable from branches are included. Anonymous/detached snapshots are not attached to any branch and will not appear.
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
Diff #
The result of comparing two snapshots
Methods:
| Name | Description |
|---|---|
is_empty | Returns True if the diff contains no changes. |
Attributes:
| Name | Type | Description |
|---|---|---|
deleted_arrays | set[str] | The arrays that were deleted in the target ref. |
deleted_groups | set[str] | The groups that were deleted in the target ref. |
moved_nodes | list[tuple[str, str]] | The list of node moves, in order of application, as tuples (from_path, to_path). |
new_arrays | set[str] | The arrays that were added to the target ref. |
new_groups | set[str] | The groups that were added to the target ref. |
updated_arrays | set[str] | The arrays that were updated via zarr metadata in the target ref. |
updated_chunks | dict[str, list[list[int]]] | The chunks indices that had data updated in the target ref, keyed by the path to the array. |
updated_groups | set[str] | The groups that were updated via zarr metadata in the target ref. |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
moved_nodes property #
The list of node moves, in order of application, as tuples (from_path, to_path).
updated_arrays property #
The arrays that were updated via zarr metadata in the target ref.
updated_chunks property #
The chunks indices that had data updated in the target ref, keyed by the path to the array.
updated_groups property #
The groups that were updated via zarr metadata in the target ref.
ManifestFileInfo #
Manifest file metadata
Attributes:
| Name | Type | Description |
|---|---|---|
id | str | The manifest id |
num_chunk_refs | int | The number of chunk references contained in this manifest |
size_bytes | int | The size in bytes of the |
Source code in icechunk-python/python/icechunk/_icechunk_python.pyi
SnapshotInfo #
Metadata for a snapshot
Attributes:
| Name | Type | Description |
|---|---|---|
id | str | The snapshot ID |
message | str | The commit message of the snapshot |
metadata | dict[str, Any] | The metadata of the snapshot |
parent_id | str | None | The snapshot ID |
written_at | datetime | The timestamp when the snapshot was written |