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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nominal_streaming-0.9.3-cp310-abi3-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10+Windows x86-64

nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_x86_64.whl (3.9 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_armv7l.whl (3.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (3.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

nominal_streaming-0.9.3-cp310-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0bfd4a5a3f28a03b7a2f844e6374a96620533a27b5fa8941d171ec2f18fb0617
MD5 76905613e42542c3841649e9a8837b7a
BLAKE2b-256 c49ca4bcd4b50524fbcf7d64c9651b4a6d2bfb83a1708b7fc7e853a31b20c72a

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 33839af9d044c747e74e34165b03830ba43dfe608bac329b01135e314e1a8e9d
MD5 d8bc8f27ae5aa4156fb1e73a94da63d5
BLAKE2b-256 54811c49ec9c854f0778d96508278c65ae022cf7a1903b35c6f932277e7104c8

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 17873f0ee6128f21e211959ee55610bc2b26652d4be07f549f36562b17d2c623
MD5 9a0fb5a81d720cffeb9c4caeebfdefaf
BLAKE2b-256 8eefab62988458202c7a3585ecd7dbb6812f815cd02ab06ef0da9a49e8f8b8c6

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 62da48ec91c960f13190052c6a5e03b023117de4eb037f87a29ecb7177de5112
MD5 e9c3762f2b56881fe97e284cacd20cca
BLAKE2b-256 b5e75450226b23916796c7369a0ec3c4bc23c16a75dcf7c3bab8c9bd6ba23296

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0639e8ecb813fca0f4a2665ee7eb5c4663f93976a0bab902be2faa19a52c67bd
MD5 147a7a842716666772bdaa0b44c05d95
BLAKE2b-256 9fd1b9204f81fe9511a0cab8ea1ef0009d58fcf3a9c8f4f72ff05c6e8de13ced

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3d3cd4a9123f3e02fa831756831421bb1d72024fff54091b2879993636c4ed1b
MD5 64f4bfef8e5d2e8a820b73e50e247bdd
BLAKE2b-256 0307d5883de2b331e04b991a51db694221850c70f84c443fc583b9a77dab08af

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c3de65e55d2a47eaa8a8a540fe293840648ff716dd8b5e3003332a6b5ee4a3a0
MD5 2f73656f49f691db95662bb80018fc6f
BLAKE2b-256 4a200f667d0477a069fbf716e4ef2663689373ff99d3d3b697a88efaefaa5624

See more details on using hashes here.

File details

Details for the file nominal_streaming-0.9.3-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nominal_streaming-0.9.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2feddf980364a3098fd8bf26f306e1b3c7ad738c596259f81aa8b0c9148e4063
MD5 1fe001d4018f8ec1c3f709cea7fcf513
BLAKE2b-256 8ffcb7fc7eb908600e27d1a11f718e3b47dcdcfa4fac6fcb147f00ef97c9819d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page