Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Python 3 library for connecting to WolkAbout IoT Platform

Project description

██╗    ██╗ ██████╗ ██╗     ██╗  ██╗ ██████╗ ██████╗ ███╗   ██╗███╗   ██╗███████╗ ██████╗████████╗
██║    ██║██╔═══██╗██║     ██║ ██╔╝██╔════╝██╔═══██╗████╗  ██║████╗  ██║██╔════╝██╔════╝╚══██╔══╝
██║ █╗ ██║██║   ██║██║     █████╔╝ ██║     ██║   ██║██╔██╗ ██║██╔██╗ ██║█████╗  ██║        ██║   
██║███╗██║██║   ██║██║     ██╔═██╗ ██║     ██║   ██║██║╚██╗██║██║╚██╗██║██╔══╝  ██║        ██║   
╚███╔███╔╝╚██████╔╝███████╗██║  ██╗╚██████╗╚██████╔╝██║ ╚████║██║ ╚████║███████╗╚██████╗   ██║   
 ╚══╝╚══╝  ╚═════╝ ╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝  ╚═══╝╚══════╝ ╚═════╝   ╚═╝   

                                           ██████╗ ██╗   ██╗████████╗██╗  ██╗ ██████╗ ███╗   ██╗ 
                                           ██╔══██╗╚██╗ ██╔╝╚══██╔══╝██║  ██║██╔═══██╗████╗  ██║ 
                                     █████╗██████╔╝ ╚████╔╝    ██║   ███████║██║   ██║██╔██╗ ██║ 
                                     ╚════╝██╔═══╝   ╚██╔╝     ██║   ██╔══██║██║   ██║██║╚██╗██║ 
                                           ██║        ██║      ██║   ██║  ██║╚██████╔╝██║ ╚████║ 
                                           ╚═╝        ╚═╝      ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝ 

WolkAbout Python Connector library for connecting devices to WolkAbout IoT Platform.

Supported device communication protocol(s):

  • JsonSingleReferenceProtocol

Prerequisite

  • Python 3

Installation

pip3 install wolk-connect

Installing from source

This repository must be cloned from the command line using:

git clone --recurse-submodules https://github.com/Wolkabout/WolkConnect-Python.git

Install dependencies by invoking pip3 install -r requirements.txt

Install the package by running:

py setup.py install

Example Usage

Establishing connection with WolkAbout IoT platform

Create a device on WolkAbout IoT platform by importing simple-example-manifest.json.
This manifest fits wolk_example.py and demonstrates the sending of a temperature sensor reading.

# Setup the device credentials which you received
# when the device was created on the platform
device = wolk.Device(
    key="device_key",
    password="some_password"
)

# Pass your device
wolk_device = wolk.WolkConnect(device)

wolk_device.connect()

Publishing sensor readings

wolk_device.add_sensor_reading("T", 26.93)

Data publish strategy

Stored sensor readings are pushed to WolkAbout IoT platform on demand by calling:

wolk_device.publish()

Disconnecting from the platform

wolk_device.disconnect()

Additional functionality

WolkConnect-Python library has integrated additional features which can perform full WolkAbout IoT platform potential. Read more about full feature set example HERE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
wolk_connect-3.1.0-py3-none-any.whl (61.0 kB) Copy SHA256 hash SHA256 Wheel py3 Oct 1, 2018
wolk-connect-3.1.0.tar.gz (34.2 kB) Copy SHA256 hash SHA256 Source None Oct 1, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page