device Package

Azure IoT Device Library

This library provides clients and associated models for communicating with Azure IoT services from an IoT device.

Packages

aio

Azure IoT Device Library - Asynchronous

This library provides asynchronous clients for communicating with Azure IoT services from an IoT device.

Modules

exceptions

This module defines an exception surface, exposed as part of the azure.iot.device library API

patch_documentation

This module provides hard coded patches used to modify items from the libraries. Currently we have to do like this so that we don't use exec anywhere

user_agent

This module is for creating agent strings for all clients

Classes

IoTHubDeviceClient

A synchronous device client that connects to an Azure IoT Hub instance.

Initializer for a IoTHubDeviceClient.

This initializer should not be called directly. Instead, use one of the '>>create_from_<<' classmethods to instantiate

IoTHubModuleClient

A synchronous module client that connects to an Azure IoT Hub or Azure IoT Edge instance.

Initializer for a IoTHubModuleClient.

This initializer should not be called directly. Instead, use one of the '>>create_from_<<' classmethods to instantiate

Message

Represents a message to or from IoTHub

Initializer for Message

MethodRequest

Represents a request to invoke a direct method.

Initializer for a MethodRequest.

MethodResponse

Represents a response to a direct method.

Initializer for MethodResponse.

ProvisioningDeviceClient

Client which can be used to run the registration of a device with provisioning service using Symmetric Key or X509 authentication.

Initializes the provisioning client.

NOTE: This initializer should not be called directly. Instead, the class methods that start with create_from_ should be used to create a client object.

ProxyOptions

A class containing various options to send traffic through proxy servers by enabling proxying of MQTT connection.

Initializer for proxy options. :param str proxy_type: The type of the proxy server. This can be one of three possible choices: "HTTP", "SOCKS4", or "SOCKS5" :param str proxy_addr: IP address or DNS name of proxy server :param int proxy_port: The port of the proxy server. Defaults to 1080 for socks and 8080 for http. :param str proxy_username: (optional) username for SOCKS5 proxy, or userid for SOCKS4 proxy.This parameter is ignored if an HTTP server is being used.

If it is not provided, authentication will not be used (servers may accept unauthenticated requests).

RegistrationResult

The final result of a completed or failed registration attempt :ivar:request_id: The request id to which the response is being obtained :ivar:operation_id: The id of the operation as returned by the registration request. :ivar status: The status of the registration process as returned by the provisioning service. Values can be "unassigned", "assigning", "assigned", "failed", "disabled" :ivar registration_state : Details like device id, assigned hub , date times etc returned from the provisioning service.

Values can be "unassigned", "assigning", "assigned", "failed", "disabled" :param registration_state : Details like device id, assigned hub , date times etc returned from the provisioning service.

X509

A class with references to the certificate, key, and optional pass-phrase used to authenticate a TLS connection using x509 certificates

Initializer for X509 Certificate :param cert_file: The file path to contents of the certificate (or certificate chain)

used to authenticate the device.