Package: devicecloud
Python Device Cloud LibraryBe sure to check out thefull documentation. AChangelogis also available.OverviewPython-devicecloud is a library providing simple, intuitive access toDigi Device Cloud(sm)for clients written in Python.The library wraps Device Cloud's REST API and hides the details of forming HTTP requests in order to gain access to device information, file data, streams, and other features of Device Cloud. The API can be foundhere.The primary target audience for this library is individuals interfacing with Device Cloud from the server side or developers writing tools to aid device development. For efficient connectivity from devices, we suggest that you first look at using theDevice Cloud Connector. That being said, this library could also be used on devices if deemed suitable.ExampleThe library provides access to a wide array of features, but here is a couple quick examples to give you a taste of what the API looks like.fromdevicecloudimportDeviceClouddc=DeviceCloud('user','pass')# show the MAC address of all devices that are currently connected## This is done using Device Cloud DeviceCore functionalityprint"== Connected Devices =="fordeviceindc.devicecore.get_devices():ifdevice.is_connected():printdevice.get_mac()# get the name and current value of all data streams having values# with a floating point type## This is done using Device Cloud stream functionalityforstreamindc.streams.get_streams():ifstream.get_data_type().lower()in('float','double'):print"%s->%s"%(stream.get_stream_id(),stream.get_current_value())For more examples and detailed documentation, be sure to checkout out theFull API Documentation.InstallationThis library can be installed usingpip. Python versions 2.7+ and 3+ are supported by the library.pipinstalldevicecloudIf you already have an older version of the library installed, you can upgrade to the latest version by doingpipinstall--upgradedevicecloudSupported FeaturesEventually, it is hoped that there will be complete feature parity between Device Cloud API and this library.  For now, however, that is not the case.  The current features are supported by the library:Getting basic device information via DeviceCoreProvision and Delete devices via DeviceCoreListing devices associated with a device cloud accountInteracting with Device Cloud Data StreamsCreate StreamsGet Stream (by id)List all streamsGet metadata for a streamWrite a single datapoint to a streamWrite many datapoints to a stream (homogeneous bulk write)Write many datapoints to multiple streams (heterogeneous bulk write)Read data points from a stream (includes control over order of
returned data set as well as allowing for retrieving data
roll-ups, etc.)Support for accessing Device Cloud FileData storeGet filedata matching a provided condition (path, file extension,
size, etc.)Write files to filedata storeRecursively walk filedata directory tree from some root locationGet full metadata and contents of files and directories.Low level support for performing basic SCI commands with limited parsing
of results and support for only a subset of available services/commands.APIs to make direct web service calls to Device Cloud with some details
handled by the library (see DeviceCloudConnection and 'ws' documentation)Device Provisioning via Mac Address, IMEI or Device IDMonitorsCreating a TCP or HTTP monitorThe following features arenotsupported at this time.  Feedback on
which features should be highest priority is always welcome.AlarmsScheduled OperationsAsynchronous SCI requestsHigh level access to many SCI/RCI operationsDeviceMetaDataDeviceVendorFileDataHistoryNetworkInterface supportXBee specific support (XBeeCore)Smart Energy APIsSMS SupportSM/UDP SupportCarrier Information AccessContributingContributions to the library are very welcome in whatever form can be provided.  This could include issue reports, bug fixes, or features additions.  For issue reports, pleasecreate an issue against the Github project.For code changes, feel free to fork the project on Github and submit a pull request with your changes.  Additional instructions for developers contributing to the project can be found in theDeveloper's Guide.LicenseThis software is open-source software.Copyright (c) 2015-2018 Digi International Inc.This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one athttp://mozilla.org/MPL/2.0/.Digi, Digi International, the Digi logo, the Digi website, Digi Device Cloud, Digi Remote Manager, and Digi Cloud Connector are trademarks or registered trademarks of Digi International Inc. in the United States and other countries worldwide. All other trademarks are the property of their respective owners.THE SOFTWARE AND RELATED TECHNICAL INFORMATION IS PROVIDED "AS IS"
WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL DIGI OR ITS
SUBSIDIARIES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE AND TECHNICAL INFORMATION
HEREIN, INCLUDING ALL SOURCE AND OBJECT CODES, IRRESPECTIVE OF HOW IT
IS USED. YOU AGREE THAT YOU ARE NOT PROHIBITED FROM RECEIVING THIS
SOFTWARE AND TECHNICAL INFORMATION UNDER UNITED STATES AND OTHER
APPLICABLE COUNTRY EXPORT CONTROL LAWS AND REGULATIONS AND THAT YOU
WILL COMPLY WITH ALL APPLICABLE UNITED STATES AND OTHER COUNTRY EXPORT
LAWS AND REGULATIONS WITH REGARD TO USE AND EXPORT OR RE-EXPORT OF THE
SOFTWARE AND TECHNICAL INFORMATION.