A pub-sub client library for Multi-messenger Astrophysics
Project description
Hop Client
hop-client is a pub-sub client library for Multimessenger Astrophysics.
Quickstart
Publish a GCN to Kafka:
hop publish kafka://hostname:port/gcn mygcn.gcn3
Subscribe to the earliest offset of a Kafka topic and print to stdout:
hop subscribe kafka://hostname:port/gcn -e
An example RFC 822 formatted GCN circular (example.gcn3
) is provided in
tests/data
.
Client configuration
properties can be passed to hop publish
via -X property=value
or in a configuration
file specified by -F <config-file>
, mimicking the behavior of kafkacat
. This can be
used to connect to a Kafka broker with SSL authentication enabled, for example.
Installation
You can install hop either via pip, conda, or from source.
To install with pip:
pip install -U hop-client
To install with conda, you must use the channel from the SCiMMA Anaconda organization:
conda install --channel scimma hop-client
To install from source:
tar -xzf hop-client-x.y.z.tar.gz
cd hop-client-x.y.z
python setup.py install
Development
A Makefile is provided to ease in testing, deployment and generating documentation.
A list of commands can be listed with make help
.
In addition, two extras are provided when installing the scimma client that installs the required test and documentation libraries:
pip install -U hop-client[dev,docs]
To mark a new version, use Github tags to mark your commit with a semver version:
git tag v0.0.1
To release a new version and upload to package repositories, push your tag after pushing your commit:
git push --tags
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 hop_client-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d647c71d20bc5cdae774f6fae004e1cf3fad7f980a45e7d979862d4304f98a46 |
|
MD5 | c3297b5992fe14de994a0c7e362dc5cf |
|
BLAKE2b-256 | 860b270e47732cf431c47077e1335c7104b6bc0ca5f572cc72251a2691920d14 |