Lunatone REST API Client
lunatone-rest-api-client is a Python package providing access to the Lunatone REST API.
It includes async clients for Lunatones REST API endpoints.
The following devices are supported:
- DALI-2 IoT Gateway (v1.14.1 or later)
- DALI-2 IoT4 Gateway (v1.14.1 or later)
- DALI-2 Display 4'' (v1.14.1 or later)
- DALI-2 Display 7'' (v1.14.1 or later)
Installation
Use pip to install the latest stable version of lunatone-rest-api-client
pip install --upgrade lunatone-rest-api-client
The current development version is available on [GitLab.com] (https://gitlab.com/lunatone-public/lunatone-rest-api-client) and can be installed directly from the git repository:
pip install git+https://gitlab.com/lunatone-public/lunatone-rest-api-client.git
Usage
import asyncio
import aiohttp
from lunatone_rest_api_client import Auth, Devices
async def main() -> None:
"""Show example of fetching devices."""
async with aiohttp.ClientSession() as session:
auth = Auth(session, "http://10.0.0.31")
devices = Devices(auth)
await devices.async_update()
print(devices.data)
if __name__ == "__main__":
asyncio.run(main())
Setting up development environment
This Python project is fully managed using the uv dependency manager.
Requirements:
To install all packages, including all development requirements:
uv sync
To run just the Python tests:
uv run pytest
Scripts
API tests:
This script sends a POST request and right after two GET requests to check if the status is changed immediately.
uv run ./scripts/api_tests.py --ip <ip-address>
Metadata
Release files for lunatone-rest-api-client 0.10.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lunatone_rest_api_client-0.10.1.tar.gz | 78.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lunatone_rest_api_client-0.10.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 109.2 kB
Release files / lunatone_rest_api_client-0.10.1.tar.gz
| Download URL | lunatone_rest_api_client-0.10.1.tar.gz |
|---|---|
| Size | 78.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31c0e908d313a0597b048955f8a593271ed05e7b379b0f9ef88c0efce5a2fafe
|
|
BLAKE2b-256 checksum How to use checksums |
86c602b7d07662cfeee941c512f2660857d509ee263da964a7c7cbf328628796
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / lunatone_rest_api_client-0.10.1-py3-none-any.whl
| Download URL | lunatone_rest_api_client-0.10.1-py3-none-any.whl |
|---|---|
| Size | 30.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3bd271d2a73928a3bffa1760e06a2dc02da04e9e65568c3cda6f94712a3000bc
|
|
BLAKE2b-256 checksum How to use checksums |
933a5b1efe92d1220d2f9b4463901f0da3f605e868527fbe5605d0c7266f2a67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|