mbed_cloud.sdk.sdk module

SDK Interface

This provides a single point of entry to use the Primary, Foundation and Client interfaces. It allows the configuration and other context information to be shared between instances.

This is the preferred method of creating Foundation Entity instances and using the Client Interface:


class mbed_cloud.sdk.sdk.SDK(config=None, api_key=None, host=None)

Bases: object

SDK Interface for interacting with Primary, Foundation and Client interfaces.

client

Client Interface, which can be use for direct communication with the Pelion Device Management API

Returns:Client Interface.
Return type:mbed_cloud.client.client.Client
config

Configuration in use by SDK instance.

Returns:Configuration object.
Return type:mbed_cloud.sdk.config.Config
foundation

Foundation Interface Entities

This provides access to all Entities in the Foundation Interface via the returned factory class.

Returns:Foundation Interface entity factory.
Return type:mbed_cloud.foundation.entities.entity_factory.EntityFactory
mbed_cloud.sdk.sdk.check_openssl_version()

Utility function to check that the OpenSSL version is recent enough

mbed_cloud.sdk.sdk.get_or_create_global_sdk_instance()

For simple use cases, a single global SDK is sufficient