Skip to main content

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:

  1. Data should exist in-memory only for a limited, configurable amount of time before it's sent to Core.
  2. Writes should fall back to disk if there are network failures.
  3. 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.

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"}
        )

Runtime metrics

Enable PyNominalStreamOpts(track_metrics=True) (or pass track_metrics=True to NominalDatasetStream.create) to emit dictionary enqueue staleness and Core request latency metrics. Metrics are disabled by default.

Metadata

Release files for nominal-streaming 0.10.0

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

Built distributions (wheels)

Table of built distributions (wheels) for nominal-streaming 0.10.0
File
nominal_streaming-0.10.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
nominal_streaming-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
nominal_streaming-0.10.0-cp310-abi3-musllinux_1_2_armv7l.whl CPython 3.10 abi3 Linux musl 1.2+ ARMv7l Details
nominal_streaming-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
nominal_streaming-0.10.0-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.10.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.10 abi3 Linux glibc 2.17+ ARMv7l Details
nominal_streaming-0.10.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
nominal_streaming-0.10.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 30.5 MB

Release files / nominal_streaming-0.10.0-cp310-abi3-win_amd64.whl

Download URL nominal_streaming-0.10.0-cp310-abi3-win_amd64.whl
Size 4.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
5be278265aca8106402aa224ee36bb7c5b3b641dcb5f98d0cba5aa0e6effa2c7
BLAKE2b-256 checksum
How to use checksums
0c0174eb613ae92d1c6a709cccbeec10e61ad293abc420410c678162d89bd8d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL nominal_streaming-0.10.0-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
bff90e8c148c7c67fc1a884dd864d3bc0120a82caac8e4b3ef82bea3b32a1372
BLAKE2b-256 checksum
How to use checksums
d4cebbbc68b86176a484e44d9b281183122b634798a5f6e37cf225e2a4efdf45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-musllinux_1_2_armv7l.whl

Download URL nominal_streaming-0.10.0-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
76454a6feeb87aefa473a0aed6a4f51274472fcd73fe68643489c9df4a77ffe1
BLAKE2b-256 checksum
How to use checksums
e74e8e9f448d022c36567401d921232fa509f112e81a4ad6a58364d7f172bde3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL nominal_streaming-0.10.0-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
125cda5cce13f3d818f939ce9777f1d41aa728689ba10268e08f8a40f503f7ad
BLAKE2b-256 checksum
How to use checksums
60578fcdaff9ef8ff621cf67a5a89904661f74202588f4d3b541cce8749b4ad2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL nominal_streaming-0.10.0-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
33bcc8923a8105fecfeba713296c796d9dbe20865a008498a8418139ff263cb1
BLAKE2b-256 checksum
How to use checksums
6c84750c48f4c4901e9966937b8cba96e4926cd9fd517e648326b7a664dc7c30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL nominal_streaming-0.10.0-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
2112406dc664f4d974dcab10796ff60d045a522fdaba4dc49df6aa3b56bdbbcb
BLAKE2b-256 checksum
How to use checksums
4c9c70477f53f75c75668814597e79395fc1711b1e7446106d087806812486b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL nominal_streaming-0.10.0-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
ab67ddae77065953b44ffcdb62ecd67b3098158104ff15e20decd4797c5f2fbd
BLAKE2b-256 checksum
How to use checksums
532ef7e3e78ead0ec353ee60c3092e564b3f7b6b5f805ea61eaf354e391040b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release files / nominal_streaming-0.10.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL nominal_streaming-0.10.0-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
0f67350358874f327f5a1b52d564f5c789ac371161a0ffa89c5c8ad63c1ef2a3
BLAKE2b-256 checksum
How to use checksums
864de679dd3bf04115596a18abc7b33abe42bcc592719930b67be55432c8f9dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.24

Release history Release notifications | RSS feed

This release

0.10.0 This release

8 release files

0.9.10

8 release files

0.9.9

8 release files

0.9.8

7 release files

0.9.7

8 release files

0.9.6

8 release files

0.9.5

8 release files

0.9.4

8 release files

0.9.3

8 release files

0.9.2

8 release files

0.9.1

8 release files

0.9.0

8 release files

0.8.2

8 release files

0.8.1

8 release files

0.8.0

8 release files

0.7.11

8 release files

0.7.10

8 release files

0.7.9

8 release files

0.7.8

8 release files

0.7.7

8 release files

0.7.6

8 release files

0.7.5

8 release files

0.7.4

8 release files

0.7.3

7 release files

0.7.2

7 release files

0.7.1

7 release files

0.7.0

7 release files

0.6.0

7 release files

0.5.8

7 release files

0.5.7

7 release files

0.5.6

7 release files

0.5.5

7 release files

0.5.4

7 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