Skip to main content

No project description provided

Project description

NeXus Streamer

Streams event and metadata from a NeXus file into Kafka, mimicking data acquisition from a live instrument. This facilitates testing software which consume these data.

This Python implementation is intended to replace a C++ implementation (https://github.com/ess-dmsc/NeXus-Streamer) and should be much lower effort to maintain. The C++ implmentation is not yet obsolete; features missing from this implementation are documented in tickets.

Installation

Python 3.7 or higher is required. https://www.python.org/downloads/

To install from PyPi do

pip install nexus-streamer

or to install with conda (does not work on Windows due to confluent-kafka package not supporting Windows)

conda install -c conda-forge -c ess-dmsc nexus-streamer

and check installation was successful by running

nexus_streamer --help

on Windows you may need to add your Python environment's Script directory to PATH for the command to work.

Usage

usage: nexus_streamer [-h] [--version]
                      [--graylog-logger-address GRAYLOG_LOGGER_ADDRESS]
                      [--log-file LOG_FILE] [-c CONFIG_FILE]
                      [-v {Trace,Debug,Warning,Error,Critical}] -f
                      FILENAME [--json-description JSON_DESCRIPTION]
                      -b BROKER -i INSTRUMENT [-s] [-z]

NeXus Streamer Args that start with '--' (eg. --version) can also be set in a
config file (specified via -c). Config file syntax allows: key=value,
flag=true, stuff=[a,b,c] (for details, see syntax at https://goo.gl/R74nmi).
If an arg is specified in more than one place, then commandline values
override environment variables which override config file values which
override defaults.

optional arguments:
  -h, --help            show this help message and exit
  --version             Print application version and exit [env var: VERSION]
  --graylog-logger-address GRAYLOG_LOGGER_ADDRESS
                        <host:port> Log to Graylog [env var:
                        GRAYLOG_LOGGER_ADDRESS]
  --log-file LOG_FILE   Log filename [env var: LOG_FILE]
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        Read configuration from an ini file [env var:
                        CONFIG_FILE]
  -v {Trace,Debug,Warning,Error,Critical}, --verbosity {Trace,Debug,Warning,Error,Critical}
                        Set logging level [env var: VERBOSITY]
  -f FILENAME, --filename FILENAME
                        NeXus file to stream data from [env var: FILENAME]
  --json-description JSON_DESCRIPTION
                        If provided use this JSON template instead of
                        generating one from the NeXus file [env var:
                        JSON_FILENAME]
  -b BROKER, --broker BROKER
                        <host[:port]> Kafka broker to forward data into [env
                        var: BROKER]
  -i INSTRUMENT, --instrument INSTRUMENT
                        Used as prefix for topic names [env var: INSTRUMENT]
  -s, --slow            Stream data into Kafka at approx realistic rate (uses
                        timestamps from file) [env var: SLOW]
  -z, --single-run      Publish only a single run (otherwise repeats until
                        interrupted) [env var: SINGLE_RUN]

Developer information

See README-dev.md

Project details


Download files

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

Source Distribution

nexus-streamer-0.1.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

nexus_streamer-0.1.2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file nexus-streamer-0.1.2.tar.gz.

File metadata

  • Download URL: nexus-streamer-0.1.2.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for nexus-streamer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f463f375e809b78d6a5b983f8c2d8bb46ed5b5a8808d81eee5fd847f138fd2c7
MD5 66754e01400bd14e3a7f80bd739e5ccb
BLAKE2b-256 a9b16b20f6d245535c015da8446ea03099789fdc1083db18f97f4685f45c98da

See more details on using hashes here.

File details

Details for the file nexus_streamer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nexus_streamer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for nexus_streamer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ba955ceee1715c844d8a859578628fdb6e22d19ab34d66eead42c79d5c5bdd92
MD5 90ffd8eadf41457f49292f945d2e49a6
BLAKE2b-256 286ef6aa60b6f42b65e69887d938e32b44cf224a4420e533ab80c160c34d5407

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page