lunatone-rest-api-client


Namelunatone-rest-api-client JSON
Version 0.5.0 PyPI version JSON
download
home_pageNone
SummaryA client library for accessing the Lunatone REST API
upload_time2025-08-29 08:19:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseNone
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/bc/a8/83520e5fce78c57113926255d633b24127e05e58ef48042bd7af9dd01591/lunatone_rest_api_client-0.5.0.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.0",
    "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": "d53a065830d0bef01133a325e460b189fbe0a06e2738a2fb734c8fbd73b0feba",
                "md5": "a19629c51f4be541c4b7958b1b6d58d3",
                "sha256": "f0a8c639acf43daa740e9c0ebc886a91690465cb4fbbba9ef53fe0af2236a569"
            },
            "downloads": -1,
            "filename": "lunatone_rest_api_client-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a19629c51f4be541c4b7958b1b6d58d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 27749,
            "upload_time": "2025-08-29T08:19:00",
            "upload_time_iso_8601": "2025-08-29T08:19:00.045290Z",
            "url": "https://files.pythonhosted.org/packages/d5/3a/065830d0bef01133a325e460b189fbe0a06e2738a2fb734c8fbd73b0feba/lunatone_rest_api_client-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bca883520e5fce78c57113926255d633b24127e05e58ef48042bd7af9dd01591",
                "md5": "3173266487a09da6a5a9b9b5d2505647",
                "sha256": "adcaf95b0459c26f53b3c742810d8636cf5ebfb7ad2f98e271e75b2527634556"
            },
            "downloads": -1,
            "filename": "lunatone_rest_api_client-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3173266487a09da6a5a9b9b5d2505647",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 74188,
            "upload_time": "2025-08-29T08:19:01",
            "upload_time_iso_8601": "2025-08-29T08:19:01.296677Z",
            "url": "https://files.pythonhosted.org/packages/bc/a8/83520e5fce78c57113926255d633b24127e05e58ef48042bd7af9dd01591/lunatone_rest_api_client-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 08:19:01",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "lunatone-public",
    "gitlab_project": "lunatone-rest-api-client",
    "lcname": "lunatone-rest-api-client"
}
        
Elapsed time: 1.53397s