Python library to interface with Hifiberry OS API.
Project description
pyhifiberry
Python library to interface with Hifiberry OS API (audiocontrol2). There are two APIs available:
This package is targeting mainly the needs for a hifiberry integration for Home assistant.
Usage example of the socketio API
Runs for 100 secs and prints artist name if metadata events occure.
import asyncio
from pyhifiberry.audiocontrol2sio import Audiocontrol2SIO
def metadata_callback(metadata):
print(metadata['artist'])
async def main():
api = await Audiocontrol2SIO.connect(<HIFIBERRY_IP>, <HIFIBERRY_PORT>)
api.metadata.add_callback(metadata_callback)
await asyncio.sleep(100)
if __name__ == '__main__':
asyncio.run(main())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhifiberry-0.1.1.tar.gz.
File metadata
- Download URL: pyhifiberry-0.1.1.tar.gz
- Upload date:
- Size: 85.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-39-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a07ed990745e31c5e9e1eacdcc0d773479ede99be4544b36977c9191c3beba55
|
|
| MD5 |
8a7ca626d85f0c8c80fde1f12bfd6088
|
|
| BLAKE2b-256 |
54c0521e5159885d5081ec20ea8f7a7e5709618f355b36d3e7e7ea0606bd1685
|
File details
Details for the file pyhifiberry-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyhifiberry-0.1.1-py3-none-any.whl
- Upload date:
- Size: 109.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.7 Linux/5.13.0-39-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c18005cf0339dee388a033ce7ebfcab6c94af6f4998ff712463e48ebcba5dbe
|
|
| MD5 |
d115dcfcef3f5b6bc6cbf1950d0e567f
|
|
| BLAKE2b-256 |
ba9f9df6f54ca4b08cacaf8b3545e2381f4fc72f78edf2ddd3bd8e3c4d113ad6
|