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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for file_writer_control-1.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb261bf4a2b47a572af6f6718b6c3c7be02a4d56768d680163cd07a3e2b17d8 |
|
MD5 | ce7f554a12826fd259a60b16fa5a5f48 |
|
BLAKE2b-256 | e50339e2b55a9efe2a55ae549e0254fe813f7acc10251ae7141a005bd1c6afe3 |
Hashes for file_writer_control-1.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c703cef8bb10898908a54c74e1e34a690d1422dedd16656de6d33f49e219b96f |
|
MD5 | cc40c641ffa05649bc1e2e945710932d |
|
BLAKE2b-256 | e1231f5995612b3b1298298d42c4f9cb9ca31bcf226416b0016ea64483e51191 |