Python simulators that stream real-time data to Azure Event Hub and Azure IoT Hub for ingestion into Microsoft Fabric Real-Time Intelligence (RTI).
Use these apps to demo Fabric Eventstreams, KQL databases, real-time dashboards, and Data Agents — no real hardware or data sources required.
| Folder | Description | Target |
|---|---|---|
| hospital/ | Patient vitals + movement events for 15 simulated patients | Event Hub |
| trains/ | NYC metro train telemetry (3 lines, GPS, speed, delays) | Event Hub or IoT Hub |
| flight-tracker/ | Live ADS-B aircraft data from a PiAware receiver | Event Hub |
| water-quality/ | Water quality monitoring (18 sensor sites, pH, turbidity, chlorine, anomaly alerts) | Event Hub |
| water-waste/ | Water waste/NRW monitoring (12 DMAs, flow balance, pressure, leak detection) | Event Hub |
Follow the setup guides to create the necessary Azure resources:
- 📘 Set up Event Hubs — Create an Event Hubs namespace, individual hubs, and SAS policies
- 📗 Set up IoT Hub — Create an IoT Hub and register devices (only needed for the IoT Hub train simulator)
# Clone the repo
git clone https://github.com/nickTinMicrosoft/rti_streaming_examples.git
cd rti_streaming_examples
# Create your .env file from the template
cp .env.example .env
# Edit .env and paste in your connection strings# Example: Hospital vitals
cd hospital
pip install -r requirements.txt
python hospital_vitals.pyEach simulator folder has its own README.md with full setup details.
┌───────────────────────┐ ┌──────────────────┐ ┌────────────────────┐
│ Python Simulators │ │ Azure │ │ Microsoft Fabric │
│ │ │ │ │ │
│ hospital_vitals.py ─┼────▶│ Event Hub ─┼────▶│ Eventstream │
│ hospital_movement.py─┼────▶│ │ │ │ │
│ trains_eventhub.py ─┼────▶│ │ │ ▼ │
│ flight_tracker.py ─┼────▶│ │ │ KQL Database │
│ │ │ │ │ │ │
│ trains_iothub.py ─┼────▶│ IoT Hub ────────┼────▶│ ▼ │
└───────────────────────┘ └──────────────────┘ │ Real-Time │
│ Dashboard / Agent │
└────────────────────┘
All scripts load secrets from a .env file in the project root. See .env.example for the full list.
| Variable | Used By | Required |
|---|---|---|
EVENTHUB_VITALS_CONN_STR |
Hospital vitals | Yes (for hospital) |
EVENTHUB_MOVEMENT_CONN_STR |
Hospital movement | Yes (for hospital) |
EVENTHUB_TRAIN_CONN_STR |
Trains (Event Hub) | Yes (for EH trains) |
IOT_RED_LINE_CONN_STR |
Trains (IoT Hub) | Yes (for IoT trains) |
IOT_BLUE_LINE_CONN_STR |
Trains (IoT Hub) | Yes (for IoT trains) |
IOT_GREEN_LINE_CONN_STR |
Trains (IoT Hub) | Yes (for IoT trains) |
EVENTHUB_FLIGHT_CONN_STR |
Flight tracker | Yes (for flights) |
EVENTHUB_WATER_CONN_STR |
Water quality | Yes (for water-quality) |
EVENTHUB_WATER_NAME |
Water quality | Yes (for water-quality) |
EVENTHUB_WASTE_CONN_STR |
Water waste/NRW | Yes (for water-waste) |
EVENTHUB_WASTE_NAME |
Water waste/NRW | Yes (for water-waste) |
⚠️ Never commit your.envfile. It is gitignored by default.
- Python 3.10+
- An Azure subscription
- A Microsoft Fabric workspace (for the Eventstream destination)
MIT