Skip to main content

datum-stream

Python bindings for Datum stream blueprints.

Datum mirrors the Source -> Flow -> Sink and GraphDSL vocabulary from the Rust crate while keeping Python execution explicit: building a pipeline creates an immutable blueprint, and work starts only when a runnable graph is materialized with a Runtime.

Install

python -m pip install datum-stream

The package requires Python 3.13 or newer and depends on PyArrow. User Python code always runs through Arrow UDF batches: integer-stream map, filter, and flat_map wrap callables into single-column Arrow batches, while map_batches is the vectorized RecordBatch -> RecordBatch tier.

For scalar integer hot paths, use the named kernels such as map_add, map_multiply, and filter_greater_than. For Arrow batch streams, use typed col() expressions for lowerable work and map_batches for arbitrary Python. Terminal arithmetic is named too: Sink.fold() / Sink.fold_sum() sum values, and Sink.fold_product() multiplies them. Graph partitions select the typed PartitionStrategy.MODULO constant.

The package ships PEP 561 stubs (py.typed) with generic Source, Flow, Sink, RunnableGraph, Inlet, and Outlet types. Public construction is always strict: graph wiring and declared Arrow schemas are validated during builder calls, and empty Arrow inputs require an explicit schema=....

Example

import datum

with datum.Runtime() as runtime:
    graph = (
        datum.Source.range(1, 5)
        .map_add(1)
        .to_mat(datum.Sink.fold_product())
    )
    completion = graph.run(runtime)
    assert completion.wait() == 120

Scope

The current Python surface covers integer linear streams, a focused GraphDSL surface (Broadcast, Balance, Merge, Partition, Zip, Concat, and Interleave), Arrow batch UDFs, and Datum Connect for trusted client/server execution. Connect can run linear plans, supported junction graphs, tuple FlowShape results, direct ZipShape runs, and Merge/Concat/Interleave FanInShape runs. Local Connect defaults to arrow-ipc; remote Arrow payloads should prefer arrow-ipc-zstd when compression is wanted. Those wire-format defaults were chosen by measurement.

For the broader guide, see the Datum Python docs in docs/guides/python.

Metadata

Release files for datum-stream 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datum-stream 0.11.0
File Size Uploaded
datum_stream-0.11.0.tar.gz 743.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datum-stream 0.11.0
File Interpreter ABI Platform
datum_stream-0.11.0-cp313-abi3-manylinux_2_39_x86_64.whl CPython 3.13 abi3 Linux glibc 2.39+ x86-64 Details

Total release size: 8.2 MB

Release files / datum_stream-0.11.0.tar.gz

Download URL datum_stream-0.11.0.tar.gz
Size 743.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4dca123b068a19dab9dabef7d89b9ce0d5d6592c066d08130b12f7089fbe54e2
BLAKE2b-256 checksum
How to use checksums
44afcb32e253fb8d6159afc6759044d1f58b027d257edd660959bca9ed7f5cf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release files / datum_stream-0.11.0-cp313-abi3-manylinux_2_39_x86_64.whl

Download URL datum_stream-0.11.0-cp313-abi3-manylinux_2_39_x86_64.whl
Size 7.5 MB
Tags CPython 3.13 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
923f6e5b76d11c9a5a8e3acb661745ddd0ccd6bb828e28ea10c9537cbcd762ae
BLAKE2b-256 checksum
How to use checksums
68101eb9c327339aee09cbabcaa3956eb8adbb4a8b1a2d641eaf1fb0620e7efc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.10.9

3 release files

0.10.8

3 release files

0.10.7

3 release files

0.10.6

3 release files

0.10.5

3 release files

0.10.4

3 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page