A Python SDK for connecting devices to Microsoft Azure IoT services

Overview

V2 - We are now GA!

Build Status

This repository contains code for the Azure IoT SDKs for Python. This enables python developers to easily create IoT device solutions that seamlessly connect to the Azure IoT Hub ecosystem.

If you're looking for the v1.x.x client library, it is now preserved in the v1-deprecated branch.

Azure IoT SDK for Python

This repository contains the following libraries:

Critical Upcoming Change Notice

All Azure IoT SDK users are advised to be aware of upcoming TLS certificate changes for Azure IoT Hub and Device Provisioning Service that will impact the SDK's ability to connect to these services. In October 2022, both services will migrate from the current Baltimore CyberTrust CA Root to the DigiCert Global G2 CA root. There will be a transition period beforehand where your IoT devices must have both the Baltimore and Digicert public certificates installed in their certificate store in order to prevent connectivity issues.

Devices with only the Baltimore public certificate installed will lose the ability to connect to Azure IoT hub and Device Provisioning Service in October 2022.

To prepare for this change, make sure your device's certificate store has both of these public certificates installed.

For a more in depth explanation as to why the IoT services are doing this, please see this article.

Installing the libraries

Pip installs are provided for all of the SDK libraries in this repo:

Device libraries

IoTHub library

Using the libraries

Want to start off on the right foot? Be sure to learn about common pitfalls of using this Python SDK before starting a project.

You can also view samples in each library:

Features

✔️ feature available ✖️ feature planned but not yet supported no support planned*

*Features that are not planned may be prioritized in a future release, but are not currently planned

This SDK only supports the MQTT protocol.

Device Client Library (azure-iot-device)

IoTHub Device Client

Features Status Description
Authentication ✔️ Connect your device to IoT Hub securely with supported authentication, including symmetric key, X-509 Self Signed, Certificate Authority (CA) Signed, and SASToken
Send device-to-cloud message ✔️ Send device-to-cloud messages (max 256KB) to IoT Hub with the option to add custom properties.
Receive cloud-to-device messages ✔️ Receive cloud-to-device messages and read associated custom and system properties from IoT Hub, with the option to complete/reject/abandon C2D messages.
Device Twins ✔️ IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin tags, subscribe to desired properties.
Direct Methods ✔️ IoT Hub gives you the ability to invoke direct methods on devices from the cloud. The SDK supports handler for method specific and generic operation.
Connection Status and Error reporting ✖️ Error reporting for IoT Hub supported error code. *This SDK supports error reporting on authentication and Device Not Found.
Retry policies ✔️ Operations which fail with a transient error and dropped connections will be retried with a fixed 10 second interval by default. This functionality can be disabled if desired, and the interval can be configured
Upload file to Blob ✔️ A device can initiate a file upload and notifies IoT Hub when the upload is complete.

IoTHub Module Client

Note: IoT Edge for Python is scoped to Linux containers & devices only. Learn more about using Linux containers for IoT edge on Windows devices.

Features Status Description
Authentication ✔️ Connect your device to IoT Hub securely with supported authentication, including symmetric key, X-509 Self Signed, and Certificate Authority (CA) Signed. SASToken authentication is not currently supported.
Send device-to-cloud message ✔️ Send device-to-cloud messages (max 256KB) to IoT Hub with the option to add custom properties.
Receive cloud-to-device messages ✔️ Receive cloud-to-device messages and read associated custom and system properties from IoT Hub, with the option to complete/reject/abandon C2D messages.
Device Twins ✔️ IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin tags, subscribe to desired properties.
Direct Methods ✔️ IoT Hub gives you the ability to invoke direct methods on devices from the cloud. The SDK supports handler for method specific and generic operation.
Connection Status and Error reporting ✖️ Error reporting for IoT Hub supported error code. *This SDK supports error reporting on authentication and Device Not Found.
Retry policies ✔️ Operations which fail with a transient error and dropped connections will be retried with a fixed 10 second interval. TThis functionality can be disabled if desired, and the interval can be configured
Direct Invocation of Method on Modules ✔️ Invoke method calls to another module using using the Edge Gateway.

Provisioning Device Client

Features Status Description
TPM Individual Enrollment Provisioning via Trusted Platform Module.
X.509 Individual Enrollment ✔️ Provisioning via X.509 root certificate. Please review the samples folder and this quickstart on how to create a device client.
X.509 Enrollment Group ✔️ Provisioning via X.509 leaf certificate). Please review the samples folder on how to create a device client.
Symmetric Key Enrollment ✔️ Provisioning via Symmetric key attestation). Please review the samples folder on how to create a device client.

IoTHub Service Library (azure-iot-hub)

Registry Manager

Features Status Description
Identity registry (CRUD) ✔️ Use your backend app to perform CRUD operation for individual device or in bulk.
Cloud-to-device messaging ✔️ Use your backend app to send cloud-to-device messages, and set up cloud-to-device message receivers.
Direct Methods operations ✔️ Use your backend app to invoke direct method on device.
Device Twins operations ✔️ Use your backend app to perform device twin operations. *Twin reported property update callback and replace twin are in progress.
Query ✔️ Use your backend app to perform query for information.
Jobs ✖️ Use your backend app to perform job operation.

IoTHub Provisioning Service Library

Feature is Coming Soon

Features Status Description
CRUD Operation with TPM Individual Enrollment ✖️ Manage device enrollment using TPM with the service SDK.
Bulk CRUD Operation with TPM Individual Enrollment ✖️ Bulk manage device enrollment using TPM with the service SDK.
CRUD Operation with X.509 Individual Enrollment ✖️ Manages device enrollment using X.509 individual enrollment with the service SDK.
CRUD Operation with X.509 Group Enrollment ✖️ Manages device enrollment using X.509 group enrollment with the service SDK.
Query enrollments ✖️ Query registration states with the service SDK.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Issues
  • GPS python send message to Azure iot from Linux device

    GPS python send message to Azure iot from Linux device

    Hi guys, from Linux with python I can send messages to Iot Azure with the code below, but could you also extend on how to pass with it GPS, please?

    import os
        import asyncio
        from azure.iot.device.aio import IoTHubDeviceClient
    etc
    

    from simple_send_message from python azure sdk

    simple_send_message.py
    Sending message...
    Message successfully sent!
    
    
    enhancement IoTSDK waiting-on-reply 
    opened by AndreV84 62
  • [Technical Question]How do I handle azure.iot.device send_message hanging when message quota is exhausted

    [Technical Question]How do I handle azure.iot.device send_message hanging when message quota is exhausted

    I have a project on raspberry pi that sends telemetry data to azure hub. An issue I am coming up against is when I have exceeded by daily quota of messages being sent from my device to cloud, the following line hangs.

    await client.send_message(message)

    I am trying to get over this by using asyncio.wait_for, and setting a timeout of 2 secs, so that my code will not wait indefinitely to return from the send_message() method.

    My code does timeout after the specified time, but I get another error that Im not sure how to deal with.

    The code Im using is below...

    from azure.iot.device.aio import IoTHubDeviceClient
    from azure.iot.device import Message
    import time
    import asyncio
    from datetime import datetime
    
        
    async def SendMessage(clientPairingId,clientDeviceId,type,subType,deviceState,pairingSetpoint=None):
    
            
    
        messageTemplate = """{{"iotDeviceId":"{iotDeviceId}","timeStampUTC":"{timeStampUTC}","clientPairingId":"{clientPairingId}","clientDeviceId":"{clientDeviceId}","type":"{type}","subType":"{subType}","state": "{deviceState}","setPoint": "{pairingSetpoint}"}}"""        
        connectionString="**********"
        client = IoTHubDeviceClient.create_from_connection_string(connectionString)
        
        await client.connect()
        
        message = Message(messageTemplate.format(iotDeviceId="xx1",
                                                clientPairingId=clientPairingId,
                                                clientDeviceId=clientDeviceId,
                                                type=type,
                                                subType=subType,
                                                deviceState=deviceState,
                                                pairingSetpoint=pairingSetpoint,
                                                timeStampUTC=datetime.utcnow()))
       
    
        
        
        await client.send_message(message)
        #await asyncio.sleep(300)
        await client.shutdown()
    
    async def main():
        for i in range(1):
            try:
                coros=[SendMessage(clientPairingId="cp1",clientDeviceId="cd1",type="D",subType="ST1",deviceState="On",pairingSetpoint="n/a")]
                
                await asyncio.wait_for(asyncio.gather(*coros),.5)
                
            except asyncio.TimeoutError:
                print("Timed out")
            except asyncio.CancelledError:
                print("Cancelled")
            except Exception as e:
                print(e)
            except:
                print("catch all")
    
    def handle_exception(loop, context):
        msg=context.get("exception",context["message"])
        
    if __name__ == "__main__":
        s = time.perf_counter()
        #asyncio.run(main())
        asyncio.run(main(),debug=False)
        elapsed = time.perf_counter() - s
        print(f"{__file__} executed in {elapsed:0.2f} seconds.")
    

    output ################################################# Timed out _GatheringFuture exception was never retrieved future: <_GatheringFuture finished exception=ClientError('Unexpected failure')> Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/iothub/aio/async_clients.py", line 33, in handle_result return await callback.completion() File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/async_adapter.py", line 94, in completion return await self.future concurrent.futures._base.CancelledError

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/home/pi/CabinetFarming/WIP/POC_SimpleAzureSendMessageMock.py", line 30, in SendMessage await client.send_message(message) File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/aio/patch_documentation.py", line 60, in send_message return await super(IoTHubDeviceClient_, self).send_message(message) File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/iothub/aio/async_clients.py", line 301, in send_message await handle_result(callback) File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/iothub/aio/async_clients.py", line 53, in handle_result raise exceptions.ClientError(message="Unexpected failure", cause=e) azure.iot.device.exceptions.ClientError: ClientError('Unexpected failure') caused by CancelledError() POC_SimpleAzureSendMessageMock.py executed in 0.51 seconds.

    question investigation-required fix-checked-in IoTSDK waiting-on-reply 
    opened by terryholland 34
  • ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')

    ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')

    Hi i am having this problem, this is for azure-iot-device 2.1.0

    Any ideas? thanks in advance

    ERROR:azure.iot.device.common.pipeline.pipeline_stages_mqtt:transport.connect raised error
    02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_stages_mqtt:Traceback (most recent call last):
    02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/mqtt_transport.py", line 367, in connect
    02.03.20 14:34:40 (-0700)  core      host=self._hostname, port=8883, keepalive=DEFAULT_KEEPALIVE
    02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect
    02.03.20 14:34:40 (-0700)  core      return self.reconnect()
    02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
    02.03.20 14:34:40 (-0700)  core      sock = self._create_socket_connection()
    02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    02.03.20 14:34:40 (-0700)  core      return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
    02.03.20 14:34:40 (-0700)  core    File "/usr/lib/python3.7/socket.py", line 707, in create_connection
    02.03.20 14:34:40 (-0700)  core      for res in getaddrinfo(host, port, 0, SOCK_STREAM):
    02.03.20 14:34:40 (-0700)  core    File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    02.03.20 14:34:40 (-0700)  core      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    02.03.20 14:34:40 (-0700)  core  socket.gaierror: [Errno -3] Temporary failure in name resolution
    02.03.20 14:34:40 (-0700)  core  
    02.03.20 14:34:40 (-0700)  core  The above exception was the direct cause of the following exception:
    02.03.20 14:34:40 (-0700)  core  
    02.03.20 14:34:40 (-0700)  core  Traceback (most recent call last):
    02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/pipeline/pipeline_stages_mqtt.py", line 117, in _run_op
    02.03.20 14:34:40 (-0700)  core      self.transport.connect(password=self.sas_token)
    02.03.20 14:34:40 (-0700)  core    File "/usr/local/lib/python3.7/dist-packages/azure/iot/device/common/mqtt_transport.py", line 387, in connect
    02.03.20 14:34:40 (-0700)  core      raise exceptions.ConnectionFailedError(cause=e)
    02.03.20 14:34:40 (-0700)  core  azure.iot.device.common.transport_exceptions.ConnectionFailedError: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
    02.03.20 14:34:40 (-0700)  core  
    02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_ops_base:ConnectOperation: completing with error ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
    02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_stages_base:ConnectionLockStage(ConnectOperation): op failed.  Unblocking queue with error: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
    02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.pipeline.pipeline_ops_base:ConnectOperation: completing with error ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
    02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.async_adapter:Callback completed with error ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')
    02.03.20 14:34:40 (-0700)  core  ERROR:azure.iot.device.common.async_adapter:["azure.iot.device.common.transport_exceptions.ConnectionFailedError: ConnectionFailedError(None) caused by gaierror(-3, 'Temporary failure in name resolution')\n"]
    

    AB#7366699

    investigation-required IoTSDK customer-reported 
    opened by MiguelCHR 34
  • ImportError: libboost_python-py27.so.1.55.0: cannot open shared object file: No such file or directory on raspbian

    ImportError: libboost_python-py27.so.1.55.0: cannot open shared object file: No such file or directory on raspbian

    • OS and version used: Linux raspberrypi 4.9.80-v7+ #1098 SMP Fri Mar 9 19:11:42 GMT 2018 armv7l GNU/Linux

    • Python runtime used: Python 2.7.13 and Python 3.5.3

    • SDK version used: 1.3.0

    Description of the issue:

    import iothub_client fails with the error message seen below

    Code sample exhibiting the issue:

    import iothub_client

    Console log of the issue:

    Traceback (most recent call last): File "app.py", line 4, in import iothub_client File "/home/pi/.local/lib/python2.7/site-packages/iothub_client/init.py"line 1, in from .iothub_client import * ImportError: libboost_python-py27.so.1.55.0: cannot open shared object file: Nsuch file or directory

    enhancement raspbian 
    opened by eifinger 32
  • Error showing from .iothub_client import *

    Error showing from .iothub_client import *

    Operating System: Windows 10 Language : Python Version: Python 3.7

    I was going through the tutorial given on Azure Portal's IoT Hub for sending telemetry. I am following the python tutorial https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-python .

    azure python tutorial

    I followed the steps given exactly in the tutorial. The sample code to be executed was also given https://github.com/Azure-Samples/azure-iot-samples-python/archive/master.zip

    When i run the SimulatedDevice.py in the folder simulated-device code i get the following error

    error

    I also tried the suggestions given on net. I created an anaconda environment in python 3.6 and python 2.7 . But the same error persists. Can someone help with the above issue?

    question 
    opened by kiran007francis 29
  • Disconnect without reconnect in rc13

    Disconnect without reconnect in rc13

    Up until v2.0rc12 I sometimes had the issue with the (spurious) OutOfMemory error related to connection problems. Since updating to rc13 last week, I did not find those issues anymore, but instead had the following:

    02:09:14|pipeline| ERROR |pipeline_stages:_on_mqtt_discon | MQTTTransportStage: _on_mqtt_disconnect called: Paho returned rc==1 caused by None
    02:09:14|pipeline| WARNI |pipeline_stages:_on_mqtt_discon | MQTTTransportStage: disconnection was unexpected
    02:09:14|pipeline| ERROR |handle_exceptio:handle_backgrou | Exception caught in background thread.  Unable to handle.
    02:09:14|pipeline| ERROR |handle_exceptio:handle_backgrou | ['azure.iot.device.common.transport_exceptions.ConnectionDroppedError: None caused by Paho returned rc==1 caused by None\n']
    

    From then on, the connection seemed to be dead with no more messages being sent. Should this exception be handled by the user (me) or should the reconnect be done by the SDK?

    investigation-required IoTSDK customer-reported 
    opened by oerpli 28
  • Get

    Get "iotHubName is not found" error when using Pip packages

    • OS and version used: Windows 10

    • Python runtime used: Python 3.6.5

    • SDK version used: azure-iothub-device-client-1.4.0

    Description of the issue:

    When sending message to Azure IoT Hub using packages installed by Pip then get "iotHubName is not found" error.

    Code sample exhibiting the issue:

    I run the official sample:iothub_client_sample.py

    Console log of the issue:

    D:\Sample\azure-iot-sdk-python\device\samples>python iothub_client_sample.py -c "HostName=xxxxxx.azure-devices.net;DeviceId=device1;SharedAccessKey=xxxxxx" -p mqtt
    
    Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]
    IoT Hub Client for Python
    Starting the IoT Hub Python sample...
        Protocol MQTT
        Connection string=HostName=ritaiothub.azure-devices.net;DeviceId=device1;SharedAccessKey=***
    Error: Time:Mon Jul 16 17:07:45 2018 File:C:\release\iot-sdks-internals\release\python\automation\aziotsdk_pytools\src\c\iothub_client\src\iothub_client_core_ll.c Func:IoTHubClientCore_LL_CreateFromConnectionString Line:892 iotHubName is not found
    Error: Time:Mon Jul 16 17:07:45 2018 File:C:\release\iot-sdks-internals\release\python\automation\aziotsdk_pytools\src\c\iothub_client\src\iothub_client_core.c Func:create_iothub_instance Line:928 Failure creating iothub handle
    set_option TrustedCerts successful
    SetRetryPolicy to: retryPolicy = 2
    SetRetryPolicy to: retryTimeoutLimitInSeconds = 100
    GetRetryPolicy returned: retryPolicy = 2
    GetRetryPolicy returned: retryTimeoutLimitInSeconds = 100
    IoTHubClient is reporting state
    IoTHubClient sending 5 messages
    IoTHubClient.send_event_async accepted message [0] for transmission to IoT Hub.
    IoTHubClient.send_event_async accepted message [1] for transmission to IoT Hub.
    IoTHubClient.send_event_async accepted message [2] for transmission to IoT Hub.
    IoTHubClient.send_event_async accepted message [3] for transmission to IoT Hub.
    IoTHubClient.send_event_async accepted message [4] for transmission to IoT Hub.
    IoTHubClient waiting for commands, press Ctrl-C to exit
    Send status: BUSY
    Confirmation[0] for reported state received with:
        status_code: 204
        Total calls confirmed: 1
    Confirmation[0] received for message with result = OK
        message_id: message_0
        correlation_id: correlation_0
        Properties: {'temperatureAlert': 'false'}
        Total calls confirmed: 1
    Confirmation[1] received for message with result = OK
        message_id: message_1
        correlation_id: correlation_1
        Properties: {'temperatureAlert': 'false'}
        Total calls confirmed: 2
    Confirmation[2] received for message with result = OK
        message_id: message_2
        correlation_id: correlation_2
        Properties: {'temperatureAlert': 'true'}
        Total calls confirmed: 3
    Confirmation[3] received for message with result = OK
        message_id: message_3
        correlation_id: correlation_3
        Properties: {'temperatureAlert': 'true'}
        Total calls confirmed: 4
    Confirmation[4] received for message with result = OK
        message_id: message_4
        correlation_id: correlation_4
        Properties: {'temperatureAlert': 'false'}
        Total calls confirmed: 5
    
    fix-checked-in 
    opened by luyaok 28
  • Using SDK fails with error: ImportError: libboost_python-py34.so.1.54.0: cannot open shared object file: No such file or directory

    Using SDK fails with error: ImportError: libboost_python-py34.so.1.54.0: cannot open shared object file: No such file or directory

    • OS and version used: Debian GNU/Linux 8 (jessie) in a Docker container based off of python:3-slim image

    • Python runtime used: Python 3.6.3

    • SDK version used: azure-iothub-device-client (1.1.25.0) azure-iothub-service-client (1.1.0.17)

    Description of the issue:

    Installation was performed based off of the above environment as: apt-get install libpython3-dev apt-get install libboost-python-dev pip3 install azure-iothub-device-client==1.1.25.0 pip3 install azure-iothub-service-client==1.1.0.17

    Once after that, using either the device SDK or service SDK by importing in Python it fails with error: ImportError: libboost_python-py34.so.1.54.0: cannot open shared object file: No such file or directory

    Effectively cannot use Python SDK.

    Code sample exhibiting the issue:

    from iothub_service_client import IoTHubRegistryManager, IoTHubRegistryManagerAuthMethod or from iothub_client import IoTHubMessageDispositionResult

    Console log of the issue:

    From the Python console:

    from iothub_client import IoTHubMessageDispositionResult Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/site-packages/iothub_client/init.py", line 1, in from .iothub_client import * ImportError: libboost_python-py34.so.1.54.0: cannot open shared object file: No such file or directory

    investigation-required 
    opened by srids 27
  • fix(azure-iot-device): Fix flaky HandlerManager tests

    fix(azure-iot-device): Fix flaky HandlerManager tests

    • Fixed bugs in tests due to MagicMocks not being threadsafe
    • Optimized tests for better performance

    This PR has passed 10 consecutive full pipeline runs with no errors, as well as 1000 consecutive runs on a local machine

    opened by cartertinney 26
  • Error in sample from Windows

    Error in sample from Windows

    • OS and version used: Windows 10

    • Python runtime used: Python 3.4.3

    • SDK version used: azure-iothub-device-client 1.1.16.0

    Description of the issue:

    I installed successfully through pip the azure-iothub-device-client (1.1.16.0) but when I try to import iothub_client (as in the samples given in the project) I get the error below.

    Code sample exhibiting the issue:

    import iothub_client

    Console log of the issue:

    C:\Python34\python.exe C:/[securePath]/main.py Traceback (most recent call last): File "C:/[securePath]/main.py", line 11, in import iothub_client File "C:\Python34\lib\site-packages\iothub_client_init_.py", line 1, in from .iothub_client import * ImportError: DLL load failed: The specified module could not be found.

    Process finished with exit code 1

    opened by Moncefmd 25
  • [Technical Question] How to securely save DPS host and scope in device

    [Technical Question] How to securely save DPS host and scope in device

    I see at this line https://github.com/Azure/azure-iot-sdk-python/blob/master/azure-iot-device/samples/async-hub-scenarios/provision_x509.py#L15 the dps host is accesses from the env variables. Is it the secure way to save the credentials in env on a device or there is some other way to save credentials on a device?

    question IoTSDK 
    opened by amit12cool 3
Releases(2021-11-02)
Owner
Microsoft Azure
APIs, SDKs and open source projects from Microsoft Azure
Microsoft Azure
A Python SDK for connecting devices to Microsoft Azure IoT services

V2 - We are now GA! This repository contains code for the Azure IoT SDKs for Python. This enables python developers to easily create IoT device soluti

Microsoft Azure 312 Nov 24, 2021
Azure DevOps Extension for Azure CLI

Azure DevOps Extension for Azure CLI The Azure DevOps Extension for Azure CLI adds Pipelines, Boards, Repos, Artifacts and DevOps commands to the Azur

null 1 Nov 3, 2021
HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions 💻🌐💡

aws-iot-shadow-rest-api HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions ?? ?? ?? This simple script implements the following aw

AIIIXIII 3 Aug 4, 2021
Asyncio SDK for Azure Cosmos DB

Asyncio SDK for Azure Cosmos DB. This library is intended to be a very thin asyncio wrapper around the Azure Comsos DB Rest API. It is not intended to have feature parity with the Microsoft Azure SDKs but to provide async versions of the most commonly used interfaces.

Grant McDonald 1 Nov 12, 2021
Azure Neural Speech Service TTS

Written in Python using the Azure Speech SDK. App.py provides an easy way to create an Text-To-Speech request to Azure Speech and download the wav file.

Rodney 1 Oct 11, 2021
Azure Neural Speech Service TTS

Written in Python using the Azure Speech SDK. App.py provides an easy way to create an Text-To-Speech request to Azure Speech and download the wav file. Azure Neural Voices Text-To-Speech enables fluid, natural-sounding text to speech that matches the patterns and intonation of human voices.

Rodney 1 Oct 31, 2021
Herramienta para transferir eventos de Sucuri WAF hacia Azure Blob Storage.

Transfiere eventos de Sucuri hacia Azure Blob Storage Script para transferir eventos del Sucuri Web Application Firewall (WAF) hacia Azure Blob Storag

CSIRT-RD 1 Nov 29, 2021
Herramienta para transferir eventos de Sucuri WAF hacia Azure Monitor Log Analytics.

Transfiere eventos de Sucuri hacia Azure LogAnalytics Script para transferir eventos del Sucuri Web Application Firewall (WAF) hacia Azure LogAnalytic

CSIRT-RD 1 Dec 1, 2021
Herramienta para transferir eventos de Sucuri WAF hacia Azure Data Tables.

Transfiere eventos de Sucuri hacia Azure Data Tables Script para transferir eventos del Sucuri Web Application Firewall (WAF) hacia Azure Data Tables,

CSIRT-RD 1 Dec 1, 2021
Python binding for Microsoft LightGBM

pyLightGBM: python binding for Microsoft LightGBM Features: Regression, Classification (binary, multi class) Feature importance (clf.feature_importanc

Ardalan 326 Nov 6, 2021
A wrapper for aqquiring Choice Coin directly through a Python Terminal. Leverages the TinyMan Python-SDK.

CHOICE_TinyMan_Wrapper A wrapper that allows users to acquire Choice Coin directly through their Terminal using ALGO and various Algorand Standard Ass

Choice Coin 7 Nov 23, 2021
Enumerate Microsoft 365 Groups in a tenant with their metadata

Enumerate Microsoft 365 Groups in a tenant with their metadata Description The all_groups.py script allows to enumerate all Microsoft 365 Groups in a

Clément Notin 44 Nov 18, 2021
A Discord token grabber executing in a Microsoft Document.

?? Rage ?? Rage is a tool written in Python3 allowing you to inject a Python3 complete Discord token grabber (Riot) script in a Microsoft Document usi

Billy 31 Nov 25, 2021
AWS SDK for Python

Boto3 - The AWS SDK for Python Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for Python, which allows Python developers to wri

the boto project 6.9k Nov 26, 2021
Python SDK for Facebook's Graph API

Facebook Python SDK This client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical

Mobolic 2.6k Nov 27, 2021
Box SDK for Python

Box Python SDK Installing Getting Started Authorization Server-to-Server Auth with JWT Traditional 3-legged OAuth2 Other Auth Options Usage Documentat

Box 323 Nov 8, 2021
The Official Dropbox API V2 SDK for Python

The offical Dropbox SDK for Python. Documentation can be found on Read The Docs. Installation Create an app via the Developer Console. Install via pip

Dropbox 752 Nov 24, 2021
Evernote SDK for Python

Evernote SDK for Python Evernote API version 1.28 This SDK is intended for use with Python 2.X For Evernote's beta Python 3 SDK see https://github.com

Evernote 608 Nov 8, 2021
Python SDK for IEX Cloud

iexfinance Python SDK for IEX Cloud. Architecture mirrors that of the IEX Cloud API (and its documentation). An easy-to-use toolkit to obtain data for

Addison Lynch 616 Nov 25, 2021