Skip to main content

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:

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


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.7.2.tar.gz (76.7 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.7.2-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunatone_rest_api_client-0.7.2.tar.gz
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for lunatone_rest_api_client-0.7.2.tar.gz
Algorithm Hash digest
SHA256 db0fcd6cfa5b51fc38ff78e0cdb6409ffa880a06e3a0a1cb02b0646c3f37b389
MD5 984aa21f0d4841b5b62687786eda8a0a
BLAKE2b-256 ab51799c42a0ef424913912ee6cae2c33f5e8f4738fef63692c16d2d6c77f65b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lunatone_rest_api_client-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a44aae86d73e2b3fd967a2b0aff87d22acf0c723abfc14b8f4d79e4a27c46a7
MD5 8286079a4a1efbe5eab6fc279405fbdf
BLAKE2b-256 cb3222e98b48e4d9c97a6847ee37f4512a6ba6dbc9b36dc8b32e4567311365e3

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 Pingdom Monitoring Sentry Error logging StatusPage Status page