A client library for accessing the Lunatone REST API
Project description
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>
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
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 lunatone_rest_api_client-0.8.1.tar.gz.
File metadata
- Download URL: lunatone_rest_api_client-0.8.1.tar.gz
- Upload date:
- Size: 77.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a250efafb3d99b5458bcdcef2edb587635c422a4846327e36cd45fe3e84e12
|
|
| MD5 |
d113febbe62ca2f4a86d0366233275d6
|
|
| BLAKE2b-256 |
ab03618e3b7c77917f40bb16b01803619a6f476f5616518d30d8536b5cf28593
|
File details
Details for the file lunatone_rest_api_client-0.8.1-py3-none-any.whl.
File metadata
- Download URL: lunatone_rest_api_client-0.8.1-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6765008c0ea0e7fe437f2d5e65ecffc8036bfe1c755b4d971f7cc9a7aaedf18
|
|
| MD5 |
882e19b22862e9c319238ff7a21a07be
|
|
| BLAKE2b-256 |
8ba23a2746b89e1f204b9d709c0789d7e9e4b8bd024e168f2c70b03b023c3078
|