Python bindings for the Nominal Rust streaming client
Project description
nominal-streaming Python Bindings
nominal-streaming is a thin python wrapper around the existing nominal-streaming rust crate.
Usage semantics remain largely the same, but with some slight alterations to allow for a more pythonic interface.
The library aims to balance three concerns:
- Data should exist in-memory only for a limited, configurable amount of time before it's sent to Core.
- Writes should fall back to disk if there are network failures.
- Backpressure should be applied to incoming requests when network throughput is saturated.
This library streams data to Nominal Core, to a file, or to Nominal Core with a file as backup (recommended to protect against network failures). It also provides configuration to manage the tradeoff between above listed concerns.
[!WARNING] This library is still under active development and may make breaking changes.
Usage example: streaming from memory to Nominal Core with file fallback
import pathlib
import time
from nominal.core import NominalClient
from nominal_streaming import NominalDatasetStream, PyNominalStreamOpts
if __name__ == "__main__":
num_points = 100_000
stream = (
NominalDatasetStream(
auth_header="<api key>",
opts=PyNominalStreamOpts(),
)
.enable_logging("info") # can set debug, warn, etc.
.with_core_consumer("<dataset rid>")
.with_file_fallback(pathlib.Path("local_fallback.avro"))
)
with stream:
# Stream 100_000 live readings (made up values)
for idx in range(num_points):
time_ns = int(time.time() * 1e9)
value = (idx % 50) + 0.5
stream.enqueue("channel_name", time_ns, value, tags={"tag_key": "tag_value"})
# Stream 100_000 points in one batch
start_time = int(time.time() * 1e9)
timestamp_offsets = int(1e9 / 1600)
timestamps = [start_time + timestamp_offsets * idx for idx in range(num_points)]
values = [(idx % 50) + 0.5 for idx in range(num_points)]
stream.enqueue_batch(
"channel_name",
timestamps,
values,
tags={"tag_key": "tag_value"}
)
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 Distributions
Built Distributions
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 nominal_streaming-0.7.11-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa887a7e3d6e612db21aaf2a682560ce83a1fe2d0184b52cb15752a6c7501fe7
|
|
| MD5 |
62e5d14bfcb0e1f8a937028b2b17bd2d
|
|
| BLAKE2b-256 |
d0e7d5a8d115d08182d762e6c5a49a865c5c0ef2a5993f63842ee59955e21220
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bdd6c8c3f598f376298cc9451d4f7565a63272c4aa34f0d9e483e1b230ad547
|
|
| MD5 |
f915a696c8115d1db58cd51ab750ec4c
|
|
| BLAKE2b-256 |
ad6d85db667aaac0060103300efe2a8e21e0bc178dac9db0a9c0efcfff266a70
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
630ef59a241d2ffe7c98f6d72fe58f4d9abe70726ae7584f5435f36b707c8706
|
|
| MD5 |
4771800fce7fd4ede10313014e848a32
|
|
| BLAKE2b-256 |
42c6c45f48bc0cd79f844bca93b200f973035ec4faf433d2e05905b3b95e3492
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1069a90f0c1b992bafbee61a092d33a99b513b4c24587c7d3dc1164f1463fdb
|
|
| MD5 |
964e1be7656a60709a40ae945f9bd61f
|
|
| BLAKE2b-256 |
89dbbd29cf119c90c70389a302282d3d6902790b6357aadf60e5027a2ca8d7ab
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70095255b9c878d2110e0934e1db6570e9dfe9389db784601171f56208c53d1f
|
|
| MD5 |
a6c91ebf1d7c38dff50b9e2cda75e1be
|
|
| BLAKE2b-256 |
0159d319bab8c0248017bdb0df5163ef1a57f328b01c6abbea8e411786491150
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f72c0983c00b8ce2e8892c371cc7d00a2ba8b3d769e009235d5d6f0d2fcd4197
|
|
| MD5 |
59bd8cc7f9694fc569693cda529d5258
|
|
| BLAKE2b-256 |
2ee18dcecd87dea85e16e55b96a24e6c7e1ea119b80152309219f614dfa065af
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb163a5a4fdafa4d014360f6d4f89ea25d5df58b3a908312b570c8188943555
|
|
| MD5 |
5301a46a12dc93aea20d4248dd3ce9ca
|
|
| BLAKE2b-256 |
c2b3570935d8a3ff18b872418466451ae99548ac3d21123cfc9ff8fcfc58a464
|
File details
Details for the file nominal_streaming-0.7.11-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: nominal_streaming-0.7.11-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fd9eb73dda76444467dd33867f13b0d92ed79f2f3a7802d37f9107ce83a0ac3
|
|
| MD5 |
c823260f3252192fa7742036e57dab65
|
|
| BLAKE2b-256 |
5f47171f703d0facd9be51ebc7388bf288c1e5f302370dfeb1464e71d4596353
|