Mbed Cloud SDK for Python

This news file contains a log of notable changes to the SDK.

Please see mbed-cloud-sdk for a list of versions that have been released on PyPI.

2.0.5 (2019-02-26)

Bugfixes

  • Fixes to subscription patterns and filtering, also a timeout on a blocking subscription now raises a CloudTimeoutError not a Queue.empty exception. (#2103)
  • Errors received in async-responses will now populate the exception status and reason attributes. (#2134)
  • Stopping notifications now terminates cleanly without logging an error. (#2136)

2.0.4 (2018-11-30)

Bugfixes

  • Updated set_resource_value and execute_resource to use the device requests API. (#1718)
  • Fixed TypeError when devices de-register or expire. (#1871)
  • Updated package dependencies (to fix Python 2 build issues in CircleCI) (#1921)

2.0.3 (2018-11-07)

Bugfixes

  • The signature parameter for the add_certificate method is now an optional as it has been deprecated in the API. (#1483)

2.0.2 (2018-09-28)

Bugfixes

  • Configuration parameters will now be loaded from a .env file in the current working directory. (#1762)
  • Warnings will no longer be given by the old notification system when using new subscription system. (#1763)
  • Omitting device_id and resource_path parameters of ResourceValues now works as a wildcard match-all (*). (#1764)

2.0.1 (2018-09-07)

Bugfixes

  • SDK is now Python 3.7 compatible. Changes the underlying codegen module to be compatible with Python 3.7 (cannot assign to async: is a reserved keyword). (#1459)
  • Unless otherwise specified, configuration always explicitly sets a default API host. Resolves “The API is only accessible over HTTPS” error when using certificate APIs. (#1555)

Improved Documentation

  • Ensure documentation and changelog is built using the CI release version, rather than the dev version. (#1481)

2.0.0 (2018-08-07)

Features

  • Change to versioning scheme. Semver Major.Minor.Patch scheme now reflects state of SDK rather than API. (#1416)
  • Settings can now be configured from .env files through use of https://pypi.org/project/python-dotenv/ (#927)

Bugfixes

  • Fix for incorrect month/day parameter being sent to API (billing report overview) (billing)

Improved Documentation

  • This major version increment marks departure from the previous semver approach that tracked API major and minor versions. (release)

1.2.10.1235 (2018-07-05)

Features

  • Add the Billing module, which provides access to the account’s financial configurations. (#1210)

1.2.9.1210 (2018-06-27)

Features

  • Remove custom properties from accounts and user entities. (#1362)
  • Documentation now includes a full API reference, generated from the source code. (#1407)

Bugfixes

  • Minor adjustments to TPIP reporting. (#1346)
  • Previously, notifications for resource value changes would not be triggered. Resource value change subscriptions now use the correct routing keys. The SDK now provides the expected values for device_id and resource_path when notifying user code. (#1361)

1.2.8.1183 (2018-06-11)

Features

  • Support List Pre Shared Keys endpoint for Bootstrap API (#631)
  • News renamed to Changelog (#1278)
  • PaginatedResponse objects used in API list endpoints now takes max_results and page_size to remove the ambiguity of the limit parameter. (#1296)
  • Resources channel now receives the full notification rather than just the payload. (#1318)

Bugfixes

  • Log messages no longer go directly to the root logger (#1091)
  • If autostart is disabled, a CloudException is no longer raised when there is no long-polling thread (e.g. for the get_resource_value method). This fixes a regression that stopped Webhooks from being cleanly enabled. (#1292)

1.2.8.970 (2018-05-22)

Features

  • Third Party IP reports are generated according to a common format. (#1008)
  • New dockerised CI build system (#1037)
  • Client-Lite: Add device bootstrap API. This provides the ability to set Pre-Shared Keys for device bring-up. (#1099)
  • Adds ‘Value Change’ subscription channel. This supercedes ‘presubscription’ and ‘subscription’ behaviours to provide a uniform interface, in line with the existing ‘Device State’ channel. (#1102)
  • Add new ‘in’ and ‘not in (nin)’ filter operators to enable that functionality in the IAM api. (#1225)
  • Client-Lite: Manifest upload supports upload of keytable file (#552)
  • First to Claim: If a certificate is in enrollment mode, signature is not required (#924)
  • Configuration can be set using environment variables MBED_CLOUD_SDK_HOST and MBED_CLOUD_SDK_API_KEY (m0)
  • All pull requests against the repository should have a news file describing the benefit of the work done. (m1)

Bugfixes

  • Reduce the number of logs that go directly to the root logger (#1091)
  • Online documentation now links back to GitHub for license and contribution guidelines (#1097)
  • Link to the new location of the online documentation (#1109)

1.2.7.968 (2018-03-27)

Features

  • Add subscriptions High Level Abstraction. Provides access to device registration status notifications. Sends request to terminate long poll on ‘stop_notifications’. (#722)

1.2.6.852 (2018-03-08)

Features

  • Support Connector Enrollment Service API in SDK. Capabilities include: Account Admin can upload a list of Device IDs to claim, and can view the status of claimed devices. Make a new device claim using: mbed_cloud.EnrollmentAPI().add_enrollment_claim(enrollment_identity=YOUR_CLAIM_TOKEN). (#627)
  • The HTTP header User-Agent is now configured by the SDK and contains version and basic platform information, which is passed to the Mbed Cloud. (#634)

Bugfixes

  • ConnectAPI: Add a timeout parameter to set_resource_value and execute_resource_value (#1015)
  • Fix for list_campaign_device_states using outdated api (#1022)
  • ConnectAPI: Use a different api backend for consistency when retrieving resource values. set_resource_value/set_resource_value_async no longer execute a resource (use execute_resource instead). (#604)
  • SDKs now iterate subscriptions in order to delete them. (#733)
  • Use correct API for updating campaign objects (#953)

Older releases

1.2.5

Deliverables

The application is primarily hosted on pypi at https://pypi.org/project/mbed-cloud-sdk and can be installed using pip:

$ pip install mbed-cloud-sdk

Changes

  • Added ‘claimed_at’ field to Devices
  • Added ‘last_update_time’ to Groups
  • Added ‘device_mode’ to Certificate
  • Renamed ‘owner’ -> ‘owner_id’ on ApiKey
  • Re-implemented PaginatedResponse to match the API spec
    • Deprecation: No longer uses ‘.data’ attribute
    • Iterable but not indexable
    • Ease-of-use functionality such as .first()
  • Improvements to BaseObject data handling
  • Various small improvements to correctness and consistency with other SDKs

Known Issues

  • No new issues

1.2.4

Deliverables

The application is primarily hosted on pypi at https://pypi.org/project/mbed-cloud-sdk and can be installed using pip:

$ pip install mbed-cloud-sdk

Changes

  • Filter construction logic reworked
  • Added webhook notification handler
  • AsyncConsumer.wait()
  • Various bugfixes

Known Issues

  • Testing shows that get_resource_value will fail when the cloud service returns a value directly, rather than through an open notification channel. This affects all previous versions.
  • The only known workaround at present is to ensure the cloud cache is not used by:
    • Waiting between calls to get_resource_value
    • Reducing the configured TTL on the cloud client image on the device

1.2.3

Deliverables

The application is additionally hosted on pypi at https://pypi.org/project/mbed-cloud-sdk and can be installed using pip:

$ pip install mbed-cloud-sdk

Changes

  • Initial early access release tracking Mbed Cloud 1.2 APIs
  • Added unittests
  • Added coverage collection
  • Python versions supported:
    • 2.7.10+
    • 3.4.3+
  • Examples working with both Python 2.7.10+ and 3.4.3+

1.2.0-alpha

Deliverables

The application is hosted on GitHub at https://github.com/ARMmbed/mbed-cloud-sdk-python and can be installed using pip:

$ pip install ARMmbed/mbed-cloud-sdk-python@1.2.0-alpha

Changes

  • Initial early access release tracking Mbed Clou