Skip to main content

pyloxone-api

A Python API for communicating with a Loxone Miniserver.

PyPI - Python Version PyPI - License PyPI

Low-level asynchronous client for the Loxone Miniserver WebSocket API. It handles the HTTP bootstrap, WebSocket connection, authentication (token and key exchange), commands and state events. It has no dependency on Home Assistant.

Used by the PyLoxone Home Assistant integration.

Installation

pip install pyloxone-api

Requires Python 3.13 or newer.

Usage

from pyloxone_api import LoxoneConnection, LoxoneException

connection = LoxoneConnection(host, username, password, port=8080)

Keeping the token between runs

A token lets the library log in without the password. To keep it across restarts, pass a token_store object that saves and loads the token. The library never writes files itself. See Saving the token for the protocol, the stored format and a JSON-file example.

connection = LoxoneConnection(host, username, password, token_store=my_store)

The public API is exported from pyloxone_api (see __all__). Everything else is internal and may change between releases.

Version 0.3.0 is a complete rewrite of the 0.2.x series and is not API-compatible with it.

Documentation

  • Callbacks: what the library calls back into, when, and what happens on errors.
  • Saving the token: keep the login token between restarts with token_store.
  • Live web view: a developer tool that shows a Miniserver's structure and live values in the browser.

Development

We use uv for environments and builds, and pytest for tests.

uv sync --group dev        # create .venv with the package and dev tools
uv run pytest              # tests; online tests are skipped by default
uv run pytest -m online    # online tests, need a live Miniserver

Online tests can make a Miniserver behave oddly. Run them only against a Miniserver you can afford to disturb.

Build the sdist and wheel into dist/:

./scripts/build

License

AGPL-3.0-only, see LICENSE.

Metadata

Release files for pyloxone-api 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyloxone-api 0.4.1
File Size Uploaded Provenance Actions
pyloxone_api-0.4.1.tar.gz 171.7 kB Without provenance Details for pyloxone_api-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyloxone-api 0.4.1
File Interpreter ABI Platform Actions
pyloxone_api-0.4.1-py3-none-any.whl Python 3 none any Details for pyloxone_api-0.4.1-py3-none-any.whl

Total release size: 247.3 kB

Release files / pyloxone_api-0.4.1.tar.gz

Download URL pyloxone_api-0.4.1.tar.gz
Size 171.7 kB
Tags Source
SHA-256 checksum
How to use checksums
81a804e1c8bc8e10cc7dcaf35396382a45fd7bf82a0f7692d6f45c91228e94af
BLAKE2b-256 checksum
How to use checksums
023d9c97dafff7dcc42a4b5ea16fb14ef31346fb951e014f0c91664d0e633f61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pyloxone_api-0.4.1-py3-none-any.whl

Download URL pyloxone_api-0.4.1-py3-none-any.whl
Size 75.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43dbd6e2404c2a19c7093310e57d014bc0048ff63cd72a613d672eb352514545
BLAKE2b-256 checksum
How to use checksums
d93ede1bb019dc359c31c47816f7d228092623a24d7871fbd45d09b9812c9bca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pyloxone-api 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page