Cloud IoT API client library
Project description
In order to use this library, you first need to go through the following steps:
Install pip package - `pip install clearblade-cloud-iot`
Set an environment variable CLEARBLADE_CONFIGURATION which should point to your clearblade service account json file.
Optionally set an environment variable BINARYDATA_AND_TIME_GOOGLE_FORMAT to True. Look at Note about types of times and binaryData below for details.
Installation
Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.
With virtualenv, it’s possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.
Code samples and snippets
Code samples and snippets live in the samples/clearblade folder.
Supported Python Versions
Our client libraries are compatible with all current active and maintenance versions of Python.
Python >= 3.7
Unsupported Python Versions
Python <= 3.6
If you are using an end-of-life version of Python, we recommend that you update as soon as possible to an actively supported version.
Mac/Linux
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
Windows
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
Next Steps
clone the github repository.
and execute the setup.py file like , python setup.py install.
mostly if you change you imports from from google.cloud to clearblade.cloud everything else should work.
Note about types of times and binaryData
By default the following parameters are returned as the shown types:
All time parameters (e.g. cloudUpdateTime, deviceAckTime, updateTime): RFC3339 strings (e.g. “2023-01-12T23:38:07.732Z”)
CONFIG binaryData: base64-encoded string
STATE binaryData: NON-base64-encoded string
To return these parameters using the same types used by the Google IoTCore Python SDK, set environment variable BINARYDATA_AND_TIME_GOOGLE_FORMAT to True (case-insensitive string). This will ensure the following parameters are returned as the shown types:
All times: DatetimeWithNanoseconds (defined in the proto.datetime_helpers module)
All binaryData (CONFIG, STATE etc.): BYTE ARRAYS
If this environment variable is not set, or is set to any unexpeced values, then the default types listed previously are used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for clearblade-cloud-iot-1.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbfcd8f0703e3b57f2efbf2bfaad0319d696f3a19a9289c0ebad7b84c4617718 |
|
MD5 | 6658257b2eeb510b6fd0e9c7c2bdf467 |
|
BLAKE2b-256 | 392b3fe0f0d0becd8b4b02bc43a1cd525297118a43ceccb314c86cec5f6aaab2 |
Hashes for clearblade_cloud_iot-1.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ebd42e7872f4249dc7911b32eaed7311ef4d9249d7810cd3fa6db72e0c5abc1 |
|
MD5 | 2903a9d5e7a2a21395ed5f03024d9f4f |
|
BLAKE2b-256 | 988fee3a34cb744506b9099fea0b0a03990db72b52c0fdc258c64a0522c947d3 |