Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Python wrapper for the Sigfox backend REST API

Project Description

python-sigfoxapi is a Python wrapper for the Sigfox backend REST API.

At this stage only features that are accessible with LIMITED_ADMIN permissions have been implemented as I personally don’t have full access tp the REST-API.

  • Groups (info, list).
  • Device types (list, edit, errors, warnings, messages, disengage).
  • Callbacks (list, new, delete, enable, disable, errors, downlink).
  • Devices (info, list, tokenstate, messages, locations, errors, warnings, networkstate, message metrics, consumptions).
  • Coverage (redundancy, predictions).
  • Users (list)

For more details about the Sigfox backend REST API navigate to the Group page in the Sigfox backend web interface, select a group, click on REST-API and then on the API documentation link. The documentation is generated automatically and tailored to the access permission of the logged-in user.

Example

The example retrieves information about a device.

>>> from sigfoxapi import Sigfox
>>> s = Sigfox('mylogin', 'mypassword')
>>> s.device_info('002C')
{
      "id" : "002C",
      "name" : "Labege 4",
      "type" : "4d3091a05ee16b3cc86699ab",
      "last" : 1343321977,
      "averageSignal": 8.065601,
      "averageSnr": 8.065601,
      "averageRssi": -122.56,
      "state": 0,
      "lat" : 43.45,
      "lng" : 1.54,
      "computedLocation": {
          "lat" : 43.45,
          "lng" : 6.54,
          "radius": 500
      },
      "activationTime": 1404096340556,
      "pac": "545CB3B17AC98BA4",
      "tokenType": "CONTRACT",
      "contractId": "7896541254789654aedfba4c",
      "tokenEnd": 1449010800000,
      "preventRenewal": false
 }

It is also possible to have the Sigfox() methods return objects instead of dictionaries by setting sigfoxapi.RETURN_OBJECTS to True.

>>> sigfoxapi.RETURN_OBJECTS = True
>>> device = s.device_info('002C')
>>> device.averageRssi
-122.56
>>> device.computedLocation.lat
43.45

Documentation

The full documentation can be found at http://python-sigfoxapi.readthedocs.io/en/master/#.

Release History

This version
History Node

0.3.0

History Node

0.2.0

History Node

0.1.0

History Node

0.0.1

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
sigfoxapi-0.3.0-py2.py3-none-any.whl
(13.2 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Jul 10, 2017
sigfoxapi-0.3.0.tar.gz
(10.3 kB) Copy SHA256 Hash SHA256
Source None Jul 10, 2017

Supported By

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