Skip to content

Latest commit

 

History

History
 
 

samples

Samples for the Azure IoT service SDK for Python

This folder contains simple samples showing how to use the various features of the Microsoft Azure IoT Hub service from a back-end application running Python.

List of samples

And if you are looking for end to end samples that show how to do simple analytics and processing of the data generated by your device using Azure services such as Stream Analytics, Big Data, Machine Learning and others, check out our E2E samples gallery.

How to run the samples

In order to run the service samples you will first need the following prerequisites:

Note: On Windows, it is recommended to install the iothub-service-client module package using pip (see link above).

  • Create an Azure IoT Hub instance
  • Get the sample files:
    • if you have cloned the repository, Navigate to the folder service/samples
    • if you are using the iothub_service_client module installed with pip, download the samples folder content to your target.
  • To learn more about the command line options to be passed for each of the samples, type the following command (replacing sample_file.py with the sample file of your choice):
    python sample_file.py -h