Skip to main content

CLI tool to send and receive event data from Azure Event Hubs

Project description

eventhubs

PyPI Changelog Tests License

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)

Uploaded Source

Built Distribution

eventhubs-0.1.0-py3-none-any.whl (7.5 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