Lightweight data-plus-attributes node containers, with an optional lazily-loaded variant for out-of-core data.
Project description
Data Node
Lightweight data-plus-attributes node containers, with an optional lazily-loaded variant for out-of-core data.
Overview
vcti-datanode provides two small, tree-agnostic value types:
DataNode— pairsdata(annp.ndarray, any array-like, or an arbitrary object) with anattributesmetadata dict. Value equality and readablerepr/str. That's it.LazyDataNode— aDataNodewhose data is fetched on demand through a loader callback (load()) and can be freed (release()) and reloaded later. Attributes stay resident; only the data comes and goes. Built for large datasets (e.g. CAE models) where holding everything in memory at once is impractical.
They are commonly used as node payloads in a tree, but depend on nothing but numpy and can be used anywhere a "data + metadata" unit is useful.
Installation
pip install vcti-datanode
In requirements.txt
vcti-datanode>=1.0.1
In pyproject.toml dependencies
dependencies = [
"vcti-datanode>=1.0.1",
]
Quick Start
import numpy as np
from vcti.datanode import DataNode, LazyDataNode
# Eager: data held directly.
node = DataNode(data=np.array([1.0, 2.0, 3.0]), attributes={"units": "mm"})
# Lazy: data fetched on demand, freed when not needed.
lazy = LazyDataNode(loader=lambda: np.load("displacement.npy"),
attributes={"name": "displacement"})
lazy.is_loaded # False
arr = lazy.load() # loader runs once; cached thereafter
lazy.release() # frees the data; attributes remain
Dependencies
numpy>=1.26— used for array-aware value equality and repr.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vcti_datanode-1.0.1.tar.gz.
File metadata
- Download URL: vcti_datanode-1.0.1.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78074d03841f92fafb8cf46eb8d3154a22b53f3a5606f7faa964ee25ae46727b
|
|
| MD5 |
7f0beb14c37b8acd26b2486781999be7
|
|
| BLAKE2b-256 |
49f19b178b7cfefe160018dcb9cad7ee59bf08217b02d4add4df6039f89a3919
|
Provenance
The following attestation bundles were made for vcti_datanode-1.0.1.tar.gz:
Publisher:
release.yml on vcollab/vcti-python-datanode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcti_datanode-1.0.1.tar.gz -
Subject digest:
78074d03841f92fafb8cf46eb8d3154a22b53f3a5606f7faa964ee25ae46727b - Sigstore transparency entry: 1946587894
- Sigstore integration time:
-
Permalink:
vcollab/vcti-python-datanode@3955a04ae870b18ae9305547214dab350b97d213 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/vcollab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3955a04ae870b18ae9305547214dab350b97d213 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vcti_datanode-1.0.1-py3-none-any.whl.
File metadata
- Download URL: vcti_datanode-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50577c63b7f0600a8037cbe564d9d7490e3e7f77133387bd6bf01cc0146ad51b
|
|
| MD5 |
d161bfe31a35571ce4e1be1a39dbe4fa
|
|
| BLAKE2b-256 |
4f1536d22cf721a958757dfa9f26ce22813ba51d412544cd7d078d55766b4452
|
Provenance
The following attestation bundles were made for vcti_datanode-1.0.1-py3-none-any.whl:
Publisher:
release.yml on vcollab/vcti-python-datanode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vcti_datanode-1.0.1-py3-none-any.whl -
Subject digest:
50577c63b7f0600a8037cbe564d9d7490e3e7f77133387bd6bf01cc0146ad51b - Sigstore transparency entry: 1946587962
- Sigstore integration time:
-
Permalink:
vcollab/vcti-python-datanode@3955a04ae870b18ae9305547214dab350b97d213 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/vcollab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3955a04ae870b18ae9305547214dab350b97d213 -
Trigger Event:
push
-
Statement type: