Skip to main content

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.

import wolk

# 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 and server information
wolk_device = wolk.WolkConnect(
    device,
    host="api-demo.wolkabout.com",
    port=8883,
    ca_cert=".." + os.sep + ".." + os.sep + "wolk" + os.sep + "ca.crt"
)

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.

Source Distribution

wolk-connect-3.1.2.tar.gz (34.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wolk_connect-3.1.2-py3-none-any.whl (61.1 kB view details)

Uploaded Python 3

File details

Details for the file wolk-connect-3.1.2.tar.gz.

File metadata

  • Download URL: wolk-connect-3.1.2.tar.gz
  • Upload date:
  • Size: 34.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for wolk-connect-3.1.2.tar.gz
Algorithm Hash digest
SHA256 32f7223e177444c701d0e04c79ee4e31398b7d5dc643aa0d6f2b2bee103d203c
MD5 fd392e8b24635668d35c897c0f6be2ba
BLAKE2b-256 f0104936fcb05a92a703cfce814380c63cf7890e127729d77f98df5b2303ab17

See more details on using hashes here.

File details

Details for the file wolk_connect-3.1.2-py3-none-any.whl.

File metadata

  • Download URL: wolk_connect-3.1.2-py3-none-any.whl
  • Upload date:
  • Size: 61.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.7.0

File hashes

Hashes for wolk_connect-3.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 894453945016daea26eae2a207c1acc6487e7b340083097ccd8b93d74a5a187c
MD5 b89c1b5256494f5f45e238170df5a57a
BLAKE2b-256 299160f36ba5e87ff263359eeb8b5b154f51975c140f10df9d3fb5c8164a984c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page