/ examples / azureiot_secrets_example.py
azureiot_secrets_example.py
 1  # This file is where you keep secret settings, passwords, and tokens!
 2  # If you put them in the code you risk committing that info or sharing it
 3  # which would be not great. So, instead, keep it all in this one file and
 4  # keep it a secret.
 5  
 6  # To find out how to hide any changes you make to this file from Git, check out
 7  # this blog post: https://www.jimbobbennett.io/hiding-api-keys-from-git/
 8  
 9  """
10  Contains the secrets for your app including WiFi connection details.
11  DO NOT CHECK THIS INTO SOURCE CODE CONTROL!!!!11!!!
12  """
13  
14  secrets = {
15      # WiFi settings
16      "ssid": "",
17      "password": "",
18      # Azure IoT Central settings - if you are connecting to Azure IoT Central, fill in these three values
19      # To get these values, select your device in Azure IoT Central,
20      # then select the Connect button
21      # A dialog will appear with these three values
22      # id_scope comes from the ID scope value
23      # device_id comes from the Device ID value
24      # key comes from either the Primary key or Secondary key
25      "id_scope": "",
26      "device_id": "",
27      "key": "",
28      # Azure IoT Hub settings - if you are connecting to Azure IoT Hub, fill in this value
29      # To get this value, from the Azure Portal (https://aka.ms/AzurePortalHome), select your IoT Hub,
30      # then select Explorers -> IoT devices, select your device, then copy the entire primary or secondary
31      # connection string using the copy button next to the value and set this here.
32      # It will be in the format:
33      #   HostName=<your-hub>.azure-devices.net;DeviceId=<your device id>;SharedAccessKey=<key>
34      # Note - you need the primary or secondary connection string, NOT the primary or secondary key
35      "device_connection_string": "",
36  }