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
===============================
Python wrapper for the Global Sensor Networks API
===============================

.. contents:: **Table of Contents**

-------------------------
Installation
-------------------------

> pip install gsn

-------------------------
Usage
-------------------------

The wrapper uses the `sanction`_ Oauth2 library to authenticate against GSN services.
Before starting you must create a "client" on GSN services and get the client_id, client_secret and redirect_uri.
As we will be using client_credentials, the client must be linked to the user from which it will inherit the access rights.
The value of redirect uri is not used, but must nevertheless match.

Then in your python code, you can use it this way::

> import gsn
> a = gsn.API(service_url="http://localhost:9000/ws", client_id="client", client_secret="secret", redirect_uri="http://localhost")
> s = a.get_latest_values("push")
> s.values = [[1469959498000, 18]]
> r = a.push_values(s)

.. _sanction: https://github.com/demianbrecht/sanction

Sensor object
===============================

This object abstract the json representation used by GSN for the stream elements. It has the following fields:

* fields: list of triples representing the name, type and units
* name: name of the sensor
* values: list of lists. The inner lists must have the same size as the fields list and represent the data of a stream element.
* location: (optional) a triple representing the location of the sensor as latitude, longitude, altitude.
=======
CHANGES
=======

v0.2.0
-------

* adding refresh token support
* automatically tracking the expiration of access token and refreshing if necessary


v0.1.0
-------

* initial release
* supports querying the latest values and pushing data
* compatible with GSN v2.0.0



Release History

Release History

0.2.0

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.1.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
gsn-0.2.0-py2.py3-none-any.whl (5.9 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Oct 4, 2016
gsn-0.2.0.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Oct 4, 2016

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