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"}
)
Metadata
Release files for nominal-streaming 0.9.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| nominal_streaming-0.9.5-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_armv7l.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARMv7l | Details |
| nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARMv7l | Details |
| nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| nominal_streaming-0.9.5-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 29.0 MB
Release files / nominal_streaming-0.9.5-cp310-abi3-win_amd64.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
49e390c164c5afc853355e39a2ef53d183c9c2b6c73d9c255783cb02bfc87533
|
|
BLAKE2b-256 checksum How to use checksums |
4ba683feda20f8c70569cb4455b088701e3b8f5242cdff538978e666f5031aa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 3.9 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
814252fc2532d73516e0ec6419bf196b768d6b07981f0b70eab8b293990795c4
|
|
BLAKE2b-256 checksum How to use checksums |
3636564092d2c5ff1efe51453341a7ec15266b5d0136b57c0d406178f2812c70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_armv7l.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
f6fa57eb11e73fcf50dc6565a1067633314661685d1752709f5b789ed9d78eb4
|
|
BLAKE2b-256 checksum How to use checksums |
8f7dd42086aab1c9776be39cd1c3c29adc883aba99f94714fd6df78c3d7cebc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
cbaf293339dd679fb4c9acfd40748ce1bb4997ea94455e43d74e9b9052ce4765
|
|
BLAKE2b-256 checksum How to use checksums |
39da2b595bbd0bda73c51fcece310def8abf63d101a2fd1f87d9c4b3dc7abe0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 3.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
810a49753b2f4123b5e59c27350e8b23bfecb9ecde2ffd2d0bbcccaceadd8cc2
|
|
BLAKE2b-256 checksum How to use checksums |
4913f91ce6a2c4f535a7ea640dc498cbb275a7b1decf0882b46260af2faf00ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 3.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
ed0999bcc81cf6365373002cdd0ad469e237665b088b939f8ad1129254dd722d
|
|
BLAKE2b-256 checksum How to use checksums |
e8433ffc0907b678ec6c685a95fb0956190642059c17b3b588a27f2777aa19e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
67a821f97f4222812bd2df8e8a61fd4d12e9665c74e6569e780896fc874d0fe1
|
|
BLAKE2b-256 checksum How to use checksums |
463e2ecec8cc905108a48051cc43a72cfd978727313a3da7e6dcf4a911dcba07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.5-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | nominal_streaming-0.9.5-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6f89a90600f02d0ce1a69539b1cc44e18481917ac6c13a7177c43f8494fb7fa4
|
|
BLAKE2b-256 checksum How to use checksums |
d6b5e2700d999bac4851d6bbd0f4081896109d1f1141e288ac8fc2983508b93b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|