Python Hello World example of Microsoft Azure Event Hub.
- Python 3.6.x
- (Optional) Virtual Environment Wrapper
- Azure Event Hubs Setup
mkvirtualenv -p /usr/local/bin/python3 python-azure-eventhub
workon python-azure-eventhub
python setup.py develop
pytest
- Set Environment Variables in
.env
python spike-send.py
python spike-receive.py
➜ python spike-send.py
2019-08-25 15:56:43,183 - Send - INFO - Sending message: Hello, World!
2019-08-25 15:56:43,729 - Send - INFO - Runtime: 0.0870518684387207 seconds
➜ python spike-receive.py
Unable to set external certificates.
2019-08-25 15:56:51,842 - Receive - INFO - Received:<azure.eventhub.common.Offset object at 0x1086d8210>|0-Message:Hello, World!
2019-08-25 15:56:52,803 - Receive - INFO - Received 1 messages in 0.056581974029541016 seconds
- Fork it!
- Create your feature branch:
git checkout -b my-work
- Commit your changes:
git commit -am 'Add some work'
- Push to the branch:
git push origin my-work
- Submit a pull request :D