Pelion Device Management SDK for Python¶
mbed-cloud-sdk gives developers access to Pelion Device Management API using
Pelion Device Management was previously known as Mbed Cloud, some references (such as the package name) remain for technical reasons, but the two names should be considered equivalent.
Python 2.7.10+ / Python 3.4.3, built with SSL support.
pip install mbed-cloud-sdk
These instructions can also be found in the official documentation:
Create a configuration file
$HOMEor project directory, and add your API key from the portal:
Import the library and you’re ready to go.
from mbed_cloud.foundation import Device # List the first 10 devices on your Pelion Device Management account. for device in Device().list(max_results=10): print("Hello device %s" % device.name)
Documentation and examples¶
The SDK guide and examples are available at GitHub.
The documentation contains many examples covering various Use Cases that you may have. In each case you can compare the python implementation with alternatives in languages supported by the other Pelion Device Management SDKs.
The Pelion Device Management SDK for Python is open source and we would like your help; there is a brief guide on how to get started in CONTRIBUTING.md.
The Pelion Device Management SDK for Python is free to use and is licensed under the Apache License 2.0. See LICENCE for more information.
The current version scheme used by the SDK follows PEP440:
<SDK major>.<SDK minor>.<SDK patch>
Suggestions for issues that have been reported when using the SDK.
- SSL version /
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.mbedcloud.com', port=443): Max retries exceeded with url: /v3/firmware-images/ (Caused by SSLError(SSLError(1, u'[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)'),))
This probably means the Python interpreter being used has an old version of SSL. The recommended minimum version for the SDK is
1.0.2, however security best practice is to use the latest available version of SSL, which can be found here: https://www.openssl.org. It is recommended to upgrade/rebuild the Python interpreter with the latest available SSL library. The SSL version currently in use by the Python interpreter can be found using
python -c "import ssl; print(ssl.OPENSSL_VERSION)"
- SSL version /
- Pelion Device Management SDK for Python
- 2.2.0 (2019-06-14)
- 2.1.0 (2019-05-17)
- 2.0.8 (2019-05-13)
- 2.0.7 (2019-05-13)
- 2.0.6 (2019-03-05)
- 2.0.5 (2019-02-26)
- 2.0.4 (2018-11-30)
- 2.0.3 (2018-11-07)
- 2.0.2 (2018-09-28)
- 2.0.1 (2018-09-07)
- 2.0.0 (2018-08-07)
- 126.96.36.1995 (2018-07-05)
- 188.8.131.520 (2018-06-27)
- 184.108.40.2063 (2018-06-11)
- 220.127.116.110 (2018-05-22)
- 18.104.22.1688 (2018-03-27)
- 22.214.171.1242 (2018-03-08)
- Older releases