zmoog / public-notes

Apache License 2.0
0 stars 1 forks source link

Build an eventhub-cli in Python #25

Closed zmoog closed 1 year ago

zmoog commented 1 year ago

I want to build a simple Python-based CLI tool to receive and publish messages on Azure Event Hub.

Python is the ideal tool to prototype and build simple CLI tools.

UX

# config using options
eh eventdata receive --connection-string "Endpoint=sb://..." --namespace mynamespace --name myeventhub

# config using env vars
export EVEBTHUB_CONNECTION_STRING=“..”
eh eventdata receive --name azurelogs

# send
eh eventdata send --name azurelogs --data ‘{“foo”: “bar”}’

References:

zmoog commented 1 year ago

Implemented a bare bone CLI tool at https://github.com/zmoog/eventhubs/