Provides a python interface to interact with Roon
Project description
python-roon
python library to interface with the Roon API (www.roonlabs.com)
Full documentation will follow asap See the tests folder for some more code examples.
Some example code:
from roonapi import RoonApi
appinfo = {
"extension_id": "python_roon_test",
"display_name": "Python library for Roon",
"display_version": "1.0.0",
"publisher": "marcelveldt",
"email": "mygreat@emailaddress.com"
}
# host can be None if you want to use discovery - but this sometimes returns the local machine, not the real roon server
host = "192.168.1.x"
# Can be None if you don't yet have a token
token = open('mytokenfile').read()
roonapi = RoonApi(appinfo, token)
# get all zones (as dict)
print(roonapi.zones)
# get all outputs (as dict)
print(roonapi.outputs)
# receive state updates in your callback
roonapi.register_state_callback(my_state_callback)
# save the token for next time
with open('mytokenfile', 'w') as f:
f.write(roonapi.token)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
roonapi-0.0.31.tar.gz
(18.4 kB
view details)
Built Distribution
roonapi-0.0.31-py3-none-any.whl
(19.6 kB
view details)
File details
Details for the file roonapi-0.0.31.tar.gz
.
File metadata
- Download URL: roonapi-0.0.31.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 017806b85c27e3dd8d87c9287261a430273e31114031fa4f2dcd0b7cea33ea44 |
|
MD5 | 8e45a72ef07d47151e3673ef0aa6d257 |
|
BLAKE2b-256 | 05ef140b68521773acb755cfe0b59eb97277b26011d5e1dae54118002f165459 |
File details
Details for the file roonapi-0.0.31-py3-none-any.whl
.
File metadata
- Download URL: roonapi-0.0.31-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/5.4.0-1036-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855222257a94dd2727800d699e14efb562d80a1cfa3c2a5520eed2cc7665f830 |
|
MD5 | bf510e1b076bd41a584f7b6cd32993eb |
|
BLAKE2b-256 | 99a3f5ce7d776a440ba5c8c58778e5007723c134fd21cd7ae4dd4b4f5cc18a06 |