Skip to main content

A small Python library for controlling the ESS kafka-to-nexus file-writer.

Project description

File-writer-control

This is a library for controlling the ESS HDF5/NeXus file-writer application. The file-writer is controlled by sending commands to it via an Apache Kafka broker. This library implements the encoding/decoding of commands as well as an abstraction of this interface in order to simplify the commands and control.

Getting started

You can install the library with pip by running

pip install file-writer-control

The examples directory contains different examples of how to use the library - we recommend you start there.

Installing dependencies

This library uses the kafka-python library for the communication with the Kafka broker and the python-streaming-data-types for serialising and de-serialising messages to and from the filewriter. These dependencies can be installed by executing the following command in the root of the repository:

pip install -r requirements.txt

Alternatively, to install the dependencies such that they are only available to the current user, execute the following command:

pip install --user -r requirements.txt

Note: This library was developed using Python 3.8 but it is likely that it will work with Python 3.6 and up.

Running the unit tests

For running the unit tests, execute the following command in the root of this repository:

python -m pytest -s .

Installing the development version locally

First, uninstall any existing versions of this library:

pip uninstall file-writer-control

Then, from the file-writer-control root directory, run the following command:

pip install --user -e ./

Uploading package to pypi

rm -rf build dist
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*

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

file_writer_control-1.3.0.tar.gz (25.2 kB view hashes)

Uploaded Source

Built Distribution

file_writer_control-1.3.0-py3-none-any.whl (28.8 kB view hashes)

Uploaded Python 3

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