Data Pipeline
ETL-style data processing framework with composable flow nodes — sources, transformers, reducers, and combiners.
Installation
pip install vcti-data-pipeline>=2.0.0
In pyproject.toml dependencies
dependencies = [
"vcti-data-pipeline>=2.0.0",
]
Quick Start
import numpy as np
from vcti.pipeline import DataSource, DataTransformer, DataRecord, data_record
# 1. Define a source
class CsvSource(DataSource):
def __init__(self, path: str, *, name: str | None = None) -> None:
super().__init__(name=name)
self.path = path
def load(self) -> DataRecord:
arr = np.genfromtxt(self.path, dtype=None, delimiter=",", names=True)
return data_record(arr)
# 2. Define a transformer
class ScaleTransformer(DataTransformer):
def __init__(self, factor: float, *, name: str | None = None) -> None:
super().__init__(name=name)
self.factor = factor
def transform(self, record: DataRecord) -> DataRecord:
scaled = record.load().copy()
scaled["value"] *= self.factor
return data_record(scaled, record.attributes)
# 3. Compose the flow (right-to-left)
source = CsvSource("data.csv", name="raw-csv")
scaler = ScaleTransformer(factor=2.0, name="2x-scaler")
flow = scaler.connect(source)
# 4. Execute
result = flow.execute()
Combining multiple sources
from vcti.pipeline import DataCombiner
ids = IdSource()
coords = CoordSource()
combiner = DataCombiner()
flow = combiner.connect(ids)
flow = flow.connect(coords)
combined = flow.execute()
# combined.load() has fields from both sources
Iterating over cases
from vcti.pipeline import ForEachFlow
flow = ForEachFlow(
keys=CasesSource(reader),
factory=lambda case_id: CaseDataSource(reader, case_id),
key_field="ID",
)
for case_id, case_flow in flow:
record = case_flow.execute()
# process each case...
Flow Node Types
| Type | Inputs | Purpose |
|---|---|---|
DataSource |
0 (leaf) | Load data from external source |
DataTransformer |
1 | Transform one record to another |
DataReducer |
1+ | Combine multiple records into one |
DataCombiner |
1+ | Merge arrays field-wise (extends DataReducer) |
DataTarget |
1 | Persist record, pass through |
ForEachFlow |
— | Iterate over keyed cases |
Other types
| Type | Purpose |
|---|---|
DataRecord |
Alias for DataNode — the data payload flowing between nodes |
Column |
Frozen dataclass coupling column name with numpy dtype |
FlowNode |
Abstract base for all flow nodes |
Dependencies
- numpy (>=1.24)
- vcti-datanode (>=2.0.0) — DataNode (aliased as DataRecord), plus EagerDataSource / LazyDataSource
Metadata
Release files for vcti-data-pipeline 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vcti_data_pipeline-2.0.0.tar.gz | 15.1 kB | With provenance | Details for vcti_data_pipeline-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vcti_data_pipeline-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for vcti_data_pipeline-2.0.0-py3-none-any.whl |
Total release size: 29.3 kB
Release files / vcti_data_pipeline-2.0.0.tar.gz
| Download URL | vcti_data_pipeline-2.0.0.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
473ed2e39e143c4a5cf2e38c8c94c22cb009e982fcd4bf6fc92cbf099d4cc700
|
|
BLAKE2b-256 checksum How to use checksums |
036349d724fb53a270895c7519c3103bc15e01370b5aa69c061a836a2f95f1cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logRelease files / vcti_data_pipeline-2.0.0-py3-none-any.whl
| Download URL | vcti_data_pipeline-2.0.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6ca735d9d4d74d52b7f8aff9d0c444baa46862bf9b8f284b7c3f74d5836bfc8
|
|
BLAKE2b-256 checksum How to use checksums |
b75a7a368e8d0a2d2f93ccb24e1ab81f2085deb5995e135580ae5d6c0a83fe7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logSecurity for vcti-data-pipeline 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vcti_data_pipeline-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.