This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Welcome to the relayr Python Library. The repository provides Python developers with programmatic access points to the relayr platform.

These include access to the relayr cloud via the relayr API as well as direct connection to the relayr WunderBar sensors, via Bluetooth Low Energy (using BlueZ on Linux, still very experimental).

Installation

You can install the library using one of the following methods, with the help of Pip:

  1. You can download the very latest version of the repository from GitHub:

    pip install git+https://github.com/relayr/python-sdk
    
  2. You could also use the following to install the package from the Python Package Index:

    pip install relayr
    

Attention!

Receiving data via MQTT will work only for Python 2.7 and above due to limited suport in paho-mqtt for TLS in Python 2.6.

Examples

Receive a 10 second data stream, from one of your WunderBar sensors (device). In the example below the device does not have to be a public one in order to be used. You can obtain your device IDs from the relayr Dashboard My Devices section:

MQTT style (new)

import time
from relayr import Client
from relayr.dataconnection import MqttStream
c = Client(token='<my_access_token>')
dev = c.get_device(id='<my_device_id>')
def mqtt_callback(topic, payload):
    print('%s %s' % (topic, payload))
stream = MqttStream(mqtt_callback, [dev])
stream.start()
time.sleep(10)
stream.stop()

PubNub style (old)

import time
from relayr import Client
c = Client(token='<my_access_token>')
dev = c.get_device(id='<my_device_id>').get_info()
user = c.get_user()
app = c.get_app()
def pubnub_callback(message, channel):
    print(repr(message), type(message))
conn = user.connect_device(app, dev, pubnub_callback)
conn.start()
time.sleep(10)
conn.stop()

Switch a device’s LED on/off

from relayr import Client
c = Client(token='<my_access_token>')
d = c.get_device(id='<my_device_id>')
d.switch_led_on(True)

Documentation

For references to the full documenation for the Python library please visit our Developer Dashboard Python section!

Release History

Release History

0.2.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
relayr-0.2.4.tar.gz (228.6 kB) Copy SHA256 Checksum SHA256 Source Feb 27, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting