Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Mbed Cloud SDK for Python

The mbed-cloud-sdk gives developers access to the full Mbed Cloud suite using Python.

https://img.shields.io/pypi/l/mbed-cloud-sdk.svg https://img.shields.io/pypi/v/mbed-cloud-sdk.svg https://img.shields.io/pypi/pyversions/mbed-cloud-sdk.svg https://img.shields.io/pypi/status/mbed-cloud-sdk.svg https://circleci.com/gh/ARMmbed/mbed-cloud-sdk-python/tree/master.svg?style=shield&circle-token=ec05043ded945f81984e7fd2fce23fe793e7b634 https://codecov.io/gh/ARMmbed/mbed-cloud-sdk-python/branch/master/graph/badge.svg

Prerequisites

Python 2.7.10+ / Python 3.4.3, built with SSL support.

Use of virtual environments or pipenv is recommended to manage python versions and dependencies.

Installation

pip install mbed-cloud-sdk

Usage

These instructions can also be found in the official documentation:

  1. Create an API key in the Mbed Cloud Portal.

  2. Create a configuration file in your $HOME or project directory (.mbed_cloud_config.json):

    {
        "api_key": "your_api_key_here"
    }
  3. Import the library and you’re ready to go.

    from mbed_cloud import ConnectAPI
    connect_api = ConnectAPI()
    connect_api.list_connected_devices().first()
    {
      "id": "Device #1",
      "state": "unenrolled",
      ...
    }
    from mbed_cloud import AccountManagementAPI
    api = AccountManagementAPI()
    for user in api.list_users():
       print(user)
    {
      "email": "username@example.org",
      "full_name": "A.N. Individual",
      ...
    }

Documentation and examples

The full documentation and API reference is hosted here: https://cloud.mbed.com/docs/latest/mbed-cloud-sdk-python/.

See the examples directory for a collection of use-cases of this API, e.g.:

python examples/connect/list-connected-devices.py

Contributing

Mbed Cloud 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.

Licence

Mbed Cloud SDK for Python is free to use and licensed under the Apache License 2.0. See LICENCE for more information.

Versioning

The current version scheme used by the SDK follows PEP440:

<SDK major>.<SDK minor>.<SDK patch>

Troubleshooting

Suggestions for issues that have been reported when using the SDK.

  • SSL version / SSLV3_ALERT_HANDSHAKE_FAILURE
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.us-east-1.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)"

Metadata

Release files for mbed-cloud-sdk 2.1.0b1521

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mbed-cloud-sdk 2.1.0b1521
File Interpreter ABI Platform Actions
mbed_cloud_sdk-2.1.0b1521-py2.py3-none-any.whl Python 2, Python 3 none any Details for mbed_cloud_sdk-2.1.0b1521-py2.py3-none-any.whl

Release files / mbed_cloud_sdk-2.1.0b1521-py2.py3-none-any.whl

Download URL mbed_cloud_sdk-2.1.0b1521-py2.py3-none-any.whl
Size 865.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9c8ec06c4df234c98cc870c9c9e19f46bf04313fc5b45668787b8c6371952d89
BLAKE2b-256 checksum
How to use checksums
84ac3b7665c4177d77bbf8c933c785e4826152409df382ad9fb67d013defaf21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

Security for mbed-cloud-sdk 2.1.0b1521

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page