# File-writer-control
This is a library for controlling the [ESS HDF5/NeXus file-writer application](https://github.com/ess-dmsc/kafka-to-nexus).
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
```bash
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_](https://kafka-python.readthedocs.io/en/master/index.html) library for the
communication with the Kafka broker and the [_python-streaming-data-types_](https://github.com/ess-dmsc/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:
```bash
pip install -r requirements.txt
```
Alternatively, to install the dependencies such that they are only available to the current user, execute the following command:
```bash
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:
```bash
python -m pytest -s .
```
## Installing the development version locally
First, uninstall any existing versions of this library:
```bash
pip uninstall file-writer-control
```
Then, from the *file-writer-control* root directory, run the following command:
```bash
pip install --user -e ./
```
## Uploading package to *pypi*
```bash
rm -rf build dist
```
```bash
python setup.py sdist bdist_wheel
```
```bash
twine check dist/*
```
```bash
twine upload dist/*
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ess-dmsc/file_writer_control",
"name": "file-writer-control",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6.0",
"maintainer_email": "",
"keywords": "",
"author": "ScreamingUdder",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/24/a5/c5d3d44f28b93d1297dca0130d410e3bde0b5e3d97ba47c55ce15ceff9e3/file_writer_control-1.3.0.tar.gz",
"platform": null,
"description": "\n# File-writer-control\nThis is a library for controlling the [ESS HDF5/NeXus file-writer application](https://github.com/ess-dmsc/kafka-to-nexus).\nThe file-writer is controlled by sending commands to it via an Apache Kafka broker.\nThis library implements the encoding/decoding of commands as well as an abstraction of this interface in order to simplify\nthe commands and control.\n\n## Getting started\n\nYou can install the library with pip by running\n```bash\npip install file-writer-control\n```\n\nThe _examples_ directory contains different examples of how to use the library - we recommend you start there.\n\n## Installing dependencies\n\nThis library uses the [_kafka-python_](https://kafka-python.readthedocs.io/en/master/index.html) library for the\ncommunication with the Kafka broker and the [_python-streaming-data-types_](https://github.com/ess-dmsc/python-streaming-data-types)\nfor serialising and de-serialising messages to and from the filewriter. These dependencies can be installed by executing\nthe following command in the root of the repository:\n\n```bash\npip install -r requirements.txt\n```\n\nAlternatively, to install the dependencies such that they are only available to the current user, execute the following command:\n\n```bash\npip install --user -r requirements.txt\n```\n\n**Note:** This library was developed using Python 3.8 but it is likely that it will work with Python 3.6 and up.\n\n## Running the unit tests\nFor running the unit tests, execute the following command in the root of this repository:\n\n```bash\npython -m pytest -s .\n```\n\n## Installing the development version locally\n\nFirst, uninstall any existing versions of this library:\n\n```bash\npip uninstall file-writer-control\n```\n\nThen, from the *file-writer-control* root directory, run the following command:\n\n```bash\npip install --user -e ./\n```\n\n## Uploading package to *pypi*\n\n```bash\nrm -rf build dist\n```\n\n```bash\npython setup.py sdist bdist_wheel\n```\n\n```bash\ntwine check dist/*\n```\n\n```bash\ntwine upload dist/*\n```\n",
"bugtrack_url": null,
"license": "BSD 2-Clause License",
"summary": "A small Python library for controlling the ESS kafka-to-nexus file-writer.",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/ess-dmsc/file_writer_control"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1dba8d0d09e078d10a9a6f743b0ffbeb686567191c98799bda784ab325312c73",
"md5": "6022407d82824fc6ad50f12616aebb2f",
"sha256": "f4d40881ba4e6a62b2d3ba5f64bd4ae1375f540bfc3c39e519a1390eb38e23b4"
},
"downloads": -1,
"filename": "file_writer_control-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6022407d82824fc6ad50f12616aebb2f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.0",
"size": 28837,
"upload_time": "2023-09-14T15:40:22",
"upload_time_iso_8601": "2023-09-14T15:40:22.251459Z",
"url": "https://files.pythonhosted.org/packages/1d/ba/8d0d09e078d10a9a6f743b0ffbeb686567191c98799bda784ab325312c73/file_writer_control-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24a5c5d3d44f28b93d1297dca0130d410e3bde0b5e3d97ba47c55ce15ceff9e3",
"md5": "35b18be731377a5af47daa355d705a5c",
"sha256": "3613cf0de55193d66cb61a36c621358632a8826346862d4b1060202be4a7ab05"
},
"downloads": -1,
"filename": "file_writer_control-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "35b18be731377a5af47daa355d705a5c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.0",
"size": 25188,
"upload_time": "2023-09-14T15:40:23",
"upload_time_iso_8601": "2023-09-14T15:40:23.719911Z",
"url": "https://files.pythonhosted.org/packages/24/a5/c5d3d44f28b93d1297dca0130d410e3bde0b5e3d97ba47c55ce15ceff9e3/file_writer_control-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-14 15:40:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ess-dmsc",
"github_project": "file_writer_control",
"github_not_found": true,
"lcname": "file-writer-control"
}