Skip to main content

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:

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>

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lunatone_rest_api_client-0.10.0.tar.gz (78.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lunatone_rest_api_client-0.10.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file lunatone_rest_api_client-0.10.0.tar.gz.

File metadata

File hashes

Hashes for lunatone_rest_api_client-0.10.0.tar.gz
Algorithm Hash digest
SHA256 5c2a9fee11343b73f6981b27ef33a656c31e9d4d70c5e740052bde25c584a9f5
MD5 65eda7723e8360b739fedaf45c4dd3ec
BLAKE2b-256 ed77e658a29c3a3c68289ac50e64bb6a3abde21757be94a9cb96b9876d724a7a

See more details on using hashes here.

File details

Details for the file lunatone_rest_api_client-0.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lunatone_rest_api_client-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4353ea2b1c1bc3c313d81bd7ee496b6a72346551eb3336f4326813bf752435f
MD5 78a51872f3586b498b8c2261f19cf50a
BLAKE2b-256 e7d9e1482c439b493682343efb835b9cd982e57a1c2ad46fed48de6740465033

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page