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 files for sigfoxapi-fork 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sigfoxapi_fork-0.3.3.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sigfoxapi_fork-0.3.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size:22.6 kB
Release files / sigfoxapi_fork-0.3.3.tar.gz
| Download URL | sigfoxapi_fork-0.3.3.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e96f0a2cba44a7c4d900039350eaabd94a3fc5ce652756135222803cf6c85f0
|
|
BLAKE2b-256 checksum How to use checksums |
af72d17e9e67f5ae45338d45fc35fd071bf8ef737c03234f031d242e83bdc42a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201103 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
|
Release files / sigfoxapi_fork-0.3.3-py2.py3-none-any.whl
| Download URL | sigfoxapi_fork-0.3.3-py2.py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
610863ec00d4ed34e28e4818fd03dd1bacbfe1f44509ce4478ebf83927dd4f30
|
|
BLAKE2b-256 checksum How to use checksums |
78dbe9ebe0863fe48ecbbca989f07ac16bccc4742f5ce38fd507580a35ab27b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.0.post20201103 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
|