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.7
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.7-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_armv7l.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARMv7l | Details |
| nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| nominal_streaming-0.9.7-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.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARMv7l | Details |
| nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| nominal_streaming-0.9.7-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 30.4 MB
Release files / nominal_streaming-0.9.7-cp310-abi3-win_amd64.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
34c1e3278c4106a1aeeaea94a945060cb796ac9815360597989f7ef6855a30d2
|
|
BLAKE2b-256 checksum How to use checksums |
00b1600df2036088334b136bbbc61e8c79cb1eaeff73d9bef82923f78eea9699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0d394737a3c114a710752d0ce64a133d4bb975ee37c68c3fff04302933e43acb
|
|
BLAKE2b-256 checksum How to use checksums |
b3a972eb853dbb2866ecda8f54caeed0ef268180c96c8ea4eb98a1aa15a0dc39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_armv7l.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
0fa461f142eb07d57a3127cb7ebba7daf67a73c9ca3d75149a87cf080c8be951
|
|
BLAKE2b-256 checksum How to use checksums |
cf4754b455233a0266d19be9a2ac1f5ddab132e1eee752bb6e75ac199733ae4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 3.8 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
df466c7b5387496d61e7928ca1051015ed262d98597ac505a19684a277399648
|
|
BLAKE2b-256 checksum How to use checksums |
531b551daa30fbe55b9378dfe02f3d84bac54761d624563053cd42dbfa786f7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d996576a0a8444c4bad185fae4531d2cd63c55389e73b1aeaca56a9ad1b52644
|
|
BLAKE2b-256 checksum How to use checksums |
56621528d06fdc3fc16ded97df530b12b0b1e8aa687471a03638ed1c1e78c9c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
d78faaa5f31bc603e73f2a00b1020fb858d56db230ba750f098b48ec5b39a397
|
|
BLAKE2b-256 checksum How to use checksums |
dcab940a7b060284002b764c16e0391239d8227b9dc07d63f739f789eccc16d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6c9f4d852e6b72e0b23e1bc989d6e512b5fea479e24b330961170278ab0beada
|
|
BLAKE2b-256 checksum How to use checksums |
a6d6f7458fb6ce3e7717ca3db12028e28a11aed5e25e9a790887bf69b8039992
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.7-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | nominal_streaming-0.9.7-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
11b3d829923557373c4482fc4dfb6cca85917cce49d6266c5e0236cc57c91e62
|
|
BLAKE2b-256 checksum How to use checksums |
c2ac1debaf9da548a15578996f56ce54e7ff6c8dea7fbf2e1a357062d2e0a9d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|