Skip to main content

Async Python client for ETA Touch RESTful Webservices

Project description

py-etatouch-restful

Async Python client for ETA Touch RESTful Webservices.

The ETA documentation exposes the webservices at http://<eta-ip>:8080:

  • GET /user/api: read the API version.
  • GET /user/menu: read the menu tree.
  • GET /user/var/<uri>: read a single variable.
  • POST /user/var/<uri>: set a writable variable.
  • GET/PUT/DELETE /user/vars: manage temporary variable sets.
  • GET /user/errors: read active errors.
  • GET /user/varinfo/<uri>: read variable metadata and valid values.

Installation

python -m pip install py-etatouch-restful

Example

import asyncio

from etatouch_restful import EtaTouchClient


async def main() -> None:
    async with EtaTouchClient("192.168.1.50") as client:
        api_version = await client.get_api_version()
        value = await client.get_variable("112/10021/0/0/12112")
        print(api_version, value.str_value, value.native_value)


asyncio.run(main())

Development

python -m pip install -e ".[test,build]"
ruff check .
pytest
python -m build
twine check dist/*

Notes

ETA variable URIs are device-specific. For an ETA PU15, discover them through /user/menu and inspect writable values through /user/varinfo/<uri>.

Discovery Helpers

The package includes helpers to flatten the ETA menu tree and select conservative default discovery candidates:

from etatouch_restful import flatten_menu, is_default_discovery_candidate

variables = [
    variable
    for variable in flatten_menu(await client.get_menu())
    if is_default_discovery_candidate(variable)
]

Repository Setup

Empfohlene GitHub-Repo-Einstellungen:

  • Repository-Name: py-etatouch-restful
  • Default Branch: main
  • Develop Branch: develop
  • PyPI-Paketname: py-etatouch-restful

Initialer Push in ein leeres Repo:

git init
git add .
git commit -m "Initial py-etatouch-restful scaffold"
git branch -M main
git remote add origin https://github.com/<user>/py-etatouch-restful.git
git push -u origin main
git switch -c develop
git push -u origin develop

Release Notes

Releases are published from GitHub Releases through PyPI Trusted Publishing. See RELEASE.md.

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

py_etatouch_restful-0.2.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

py_etatouch_restful-0.2.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file py_etatouch_restful-0.2.0.tar.gz.

File metadata

  • Download URL: py_etatouch_restful-0.2.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_etatouch_restful-0.2.0.tar.gz
Algorithm Hash digest
SHA256 158b4cb6465737a0f3ad6ba87379bf63a1e945a17b4c81b486d83b9f3a6997bb
MD5 68a7efe4dead2803e6315ddba9e77485
BLAKE2b-256 de052f6fa2ab2dcb9b2f85452ee0c32f0ea866c544103ef6cde29baebb17a9d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_etatouch_restful-0.2.0.tar.gz:

Publisher: publish.yml on Lechtob/py-etatouch-restful

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_etatouch_restful-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_etatouch_restful-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0784d4e0a7d375a3675a8104b5ce6a992f5fa2f751ad67c8afd628521b9bf84
MD5 6583beae2bbf8c6ab22207fc32bc30e5
BLAKE2b-256 652b60db9efeeec549e5565f9695c4dff36a57b16b339ea7b69b995c9612dcda

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_etatouch_restful-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Lechtob/py-etatouch-restful

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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