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.6
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.6-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| nominal_streaming-0.9.6-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| nominal_streaming-0.9.6-cp310-abi3-musllinux_1_2_armv7l.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARMv7l | Details |
| nominal_streaming-0.9.6-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| nominal_streaming-0.9.6-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.6-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARMv7l | Details |
| nominal_streaming-0.9.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| nominal_streaming-0.9.6-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.6-cp310-abi3-win_amd64.whl
| Download URL | nominal_streaming-0.9.6-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 4.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
daf834c3773ceae9d0f40c9910accaaa2ed0439193d3b0f52d3373fdc565b257
|
|
BLAKE2b-256 checksum How to use checksums |
79b512d72a5222726cdcee23ae5ead26299e3e513cd515c4b17ddbd9804f0f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | nominal_streaming-0.9.6-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 |
583be041febadf92223dc5c2fc402d451314ee0597218068b10182af32009ee0
|
|
BLAKE2b-256 checksum How to use checksums |
4d69a8ff07777fca3653a5b80573454c6350e618e75b06cebb6ba258cc9884f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-musllinux_1_2_armv7l.whl
| Download URL | nominal_streaming-0.9.6-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 |
0f1098fe99594d99e5e5fefd8e22363a6adc976f0b93d7fcd68d3aeb475bc262
|
|
BLAKE2b-256 checksum How to use checksums |
a13e7df7d921c388574abe573f3ddd53cf6afac3730990fa57d9d0baf11914d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | nominal_streaming-0.9.6-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 |
b47f13c5f7391b9684458d0a13f3cd184c2767f09d6fa49844cf864060845af7
|
|
BLAKE2b-256 checksum How to use checksums |
49f03c15c80b852edba698ed6a9547dd2ce0f862bcec8b6e56596f22b9b0a367
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nominal_streaming-0.9.6-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 |
c5754f696a7e58753833a222199a48fa2b02b004eea0b7e2c39695e44c5d96a9
|
|
BLAKE2b-256 checksum How to use checksums |
089e4a03fec741abe8264da74ac02946484ea5e2b69bfbe3dc6f1eecc2efac42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | nominal_streaming-0.9.6-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 |
07837539236748d9b877e8d49eeaedb5a2f010e1144b76aee39076fc34b42626
|
|
BLAKE2b-256 checksum How to use checksums |
73b960bf0538cd36bb9d9b95d779c4a6ed5e0401b237ff6f361e1ed68c2eccaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | nominal_streaming-0.9.6-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 |
21de95834b00faff65eb2b4f23aae36757a7e03a15c2597f29c700409fc2f8f7
|
|
BLAKE2b-256 checksum How to use checksums |
149aa229d5c59510e25e2a9fd11bd3f46226f84cde486819c9fac4672772f59e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|
Release files / nominal_streaming-0.9.6-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | nominal_streaming-0.9.6-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 |
b86b806b2e82530c524abda13d94608cdaab29292949e4cad777afe73f57ba05
|
|
BLAKE2b-256 checksum How to use checksums |
b18a83978c969a6d05f21cfaca127d86744a1947080495b99d7318ca21eaf79f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.24
|