| Name | lunatone-rest-api-client JSON |
| Version |
0.5.3
JSON |
| download |
| home_page | None |
| Summary | A client library for accessing the Lunatone REST API |
| upload_time | 2025-10-13 14:08:29 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.12 |
| license | None |
| keywords |
api
client
lunatone
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# 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)](https://www.lunatone.com/produkt/dali-2-iot-gateway/)
- [DALI-2 IoT4 Gateway (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-iot4-gateway/)
- [DALI-2 Display 4'' (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-display-4/)
- [DALI-2 Display 7'' (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-display-7/)
## Installation
Use `pip` to install the latest stable version of `lunatone-rest-api-client`
```bash
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:
```bash
pip install git+https://gitlab.com/lunatone-public/lunatone-rest-api-client.git
```
## Usage
```python
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:
- uv (See https://docs.astral.sh/uv/getting-started/installation/)
To install all packages, including all development requirements:
```bash
uv sync
```
To run just the Python tests:
```bash
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.
```bash
uv run ./scripts/api_tests.py --ip <ip-address>
```
Raw data
{
"_id": null,
"home_page": null,
"name": "lunatone-rest-api-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "api, client, lunatone",
"author": null,
"author_email": "David Bugl <bugl@lunatone.com>",
"download_url": "https://files.pythonhosted.org/packages/d1/2d/904b32dc939e6260de572bda88610315cc1a9027b1ed7b1530cd59ba1122/lunatone_rest_api_client-0.5.3.tar.gz",
"platform": null,
"description": "# Lunatone REST API Client\n\n`lunatone-rest-api-client` is a Python package providing access to the Lunatone REST API.\n\nIt includes async clients for Lunatones REST API endpoints.\n\nThe following devices are supported:\n\n- [DALI-2 IoT Gateway (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-iot-gateway/)\n- [DALI-2 IoT4 Gateway (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-iot4-gateway/)\n- [DALI-2 Display 4'' (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-display-4/)\n- [DALI-2 Display 7'' (v1.14.1 or later)](https://www.lunatone.com/produkt/dali-2-display-7/)\n\n## Installation\n\nUse `pip` to install the latest stable version of `lunatone-rest-api-client`\n```bash\npip install --upgrade lunatone-rest-api-client\n```\n\nThe current development version is available on [GitLab.com]\n(https://gitlab.com/lunatone-public/lunatone-rest-api-client) and can be\ninstalled directly from the git repository:\n\n```bash\npip install git+https://gitlab.com/lunatone-public/lunatone-rest-api-client.git\n```\n\n## Usage\n\n```python\nimport asyncio\n\nimport aiohttp\n\nfrom lunatone_rest_api_client import Auth, Devices\n\n\nasync def main() -> None:\n \"\"\"Show example of fetching devices.\"\"\"\n async with aiohttp.ClientSession() as session:\n auth = Auth(session, \"http://10.0.0.31\")\n devices = Devices(auth)\n await devices.async_update()\n print(devices.data)\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n## Setting up development environment\n\nThis Python project is fully managed using the uv dependency manager.\n\n### Requirements:\n\n- uv (See https://docs.astral.sh/uv/getting-started/installation/)\n\nTo install all packages, including all development requirements:\n\n```bash\nuv sync\n```\n\nTo run just the Python tests:\n\n```bash\nuv run pytest\n```\n\n## Scripts\n\n### API tests:\n\nThis script sends a `POST` request and right after two `GET` requests to check if the status is changed immediately.\n\n```bash\nuv run ./scripts/api_tests.py --ip <ip-address>\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A client library for accessing the Lunatone REST API",
"version": "0.5.3",
"project_urls": {
"Homepage": "https://www.lunatone.com",
"Issues": "https://gitlab.com/lunatone-public/lunatone-rest-api-client/-/issues",
"Source": "https://gitlab.com/lunatone-public/lunatone-rest-api-client"
},
"split_keywords": [
"api",
" client",
" lunatone"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5a341994cc9fcd7fa873dc976c7273f20abb3ff6074a324e57799312fac83563",
"md5": "cee666d1d7c0d29390430c4dcc0191b4",
"sha256": "f215087dac8f538729662e5f556c1c0689e85dd4fee8f9a3e6969af314c01eb0"
},
"downloads": -1,
"filename": "lunatone_rest_api_client-0.5.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cee666d1d7c0d29390430c4dcc0191b4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 28244,
"upload_time": "2025-10-13T14:08:28",
"upload_time_iso_8601": "2025-10-13T14:08:28.048246Z",
"url": "https://files.pythonhosted.org/packages/5a/34/1994cc9fcd7fa873dc976c7273f20abb3ff6074a324e57799312fac83563/lunatone_rest_api_client-0.5.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d12d904b32dc939e6260de572bda88610315cc1a9027b1ed7b1530cd59ba1122",
"md5": "5f29218e72269b9816c07bd31fd811c1",
"sha256": "7ce7a5bb766e49fef19c2bc498c0eb42ed69ee8545e0bb2370bf8beaf644cbf8"
},
"downloads": -1,
"filename": "lunatone_rest_api_client-0.5.3.tar.gz",
"has_sig": false,
"md5_digest": "5f29218e72269b9816c07bd31fd811c1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 75176,
"upload_time": "2025-10-13T14:08:29",
"upload_time_iso_8601": "2025-10-13T14:08:29.308325Z",
"url": "https://files.pythonhosted.org/packages/d1/2d/904b32dc939e6260de572bda88610315cc1a9027b1ed7b1530cd59ba1122/lunatone_rest_api_client-0.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-13 14:08:29",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "lunatone-public",
"gitlab_project": "lunatone-rest-api-client",
"lcname": "lunatone-rest-api-client"
}