CLI tool to send and receive event data from Azure Event Hubs
Project description
eventhubs
CLI tool to send and receive event data from Azure Event Hubs
Installation
Install this tool using pip
:
pip install eventhubs
Usage
For sending data to an event hub, run:
eh eventdata send --text '{"message": "Hello Spank"}'
For receiving data to an event hub, run:
eh eventdata receive
Configuration
You can set up the connection string and event hub name using the command line options:
eh eventdata receive --connection-string "Endpoint=.." --name "application-insights"
or the environment variables (or a mix of both):
export EVENTHUB_CONNECTION_STRING="Endpoint=sb://...="
export EVENTHUB_NAME="application-insights"
eh eventdata receive
eh eventdata receive --name "another-name"
For help, run:
eventhubs --help
You can also use:
python -m eventhubs --help
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd eventhubs
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
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
eventhubs-0.1.0.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for eventhubs-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c083078d1d737e381a38129cd2ae4af5609a517285cac1cf5f6683351a8051b0 |
|
MD5 | 557b7a84852005917a0dadd1f82996ac |
|
BLAKE2b-256 | dd20c06c91b657caf0976cae5e34ea70dbb5d28c642aa04eca8fd6f7077ea8ad |