Spyrk
Python module for Spark devices.
Use it as follow:
from spyrk import SparkCloud
USERNAME = 'he.ho@example.com'
PASSWORD = 'pasSs'
ACCESS_TOKEN = '12adza445452d4za524524524d5z2a4'
spark = SparkCloud(USERNAME, PASSWORD)
# Or
spark = SparkCloud(ACCESS_TOKEN)
# List devices
print spark.devices
# Access device
spark.devices['captain_hamster']
# Or, shortcut form
spark.captain_hamster
# List functions and variables of a device
print spark.captain_hamster.functions
print spark.captain_hamster.variables
# Tell if a device is connected
print spark.captain_hamster.connected
# Call a function
spark.captain_hamster.digitalwrite('D7', 'HIGH')
print spark.captain_hamster.analogread('A0')
# (or any of your own custom function)
# Get variable value
spark.captain_hamster.myvariable
Currently supporting:
Initialisation by username/password (generating a new access token every time).
Initialisation by access token (get it from the Build Web IDE).
Automatic discovery of devices.
Automatic discovery of functions and variables in a device.
Calling a function.
Accessing a variable value.
Not yet supported:
Subscribing and publishing events
Any PUT method of the API (like uploading a firmware or application.cpp). That would be cool though.
Installation
$ pip install spyrk
Licensing and contributions
Spyrk is licensed under LGPLv3 and welcome contributions following the C4.1 - Collective Code Construction Contract process.
Individual Contributors
A list of people who have contributed to Spyrk in order of their first contribution.
Format: Name-or-Well-known-alias <email@domain.tld> (url)
Axel Voitier <axel.voitier@gmail.com>
Wojtek Siudzinski <admin@suda.pl>
Please, add yourself when you contribute!
CHANGELOG
0.0.3 - ?
Fixed Python 3 support
0.0.2 - 30 July 2014
Complying to Flake8 code-style checker
Added accessing variable value
Added requires_deep_update to Device declaration
Fixed logging in bug and updated to support requires_deep_update value for the device
Added setup.py and refactored main package as Spyrk.SparkCloud
0.0.1 - 26 January 2014
Initial dump of code
Metadata
Release files for spyrk 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spyrk-0.0.4.tar.gz | 10.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spyrk-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 18.9 kB
Release files / spyrk-0.0.4.tar.gz
| Download URL | spyrk-0.0.4.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1747c710bceeffaf5d60e4e692831e60439c4fa4e5732132d67b8fd9507e9377
|
|
BLAKE2b-256 checksum How to use checksums |
6db98d168df047a4aa9318ab701fd8232f17ed0153ca5ba45685bb6fbb59319a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / spyrk-0.0.4-py2.py3-none-any.whl
| Download URL | spyrk-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5c190901a974e7fbfea6c2741e8cbd9b19e7eb402a18e4bfa8e74aeac06bc266
|
|
BLAKE2b-256 checksum How to use checksums |
c9a9285963838bbf85f693fb3ef9aba0a826b5bbcd9ded307d449789356bc3c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for spyrk 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.