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.2

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.2
File Size Uploaded Provenance Actions
pyloxone_api-0.4.2.tar.gz 196.0 kB Without provenance Details for pyloxone_api-0.4.2.tar.gz

Built distribution (wheel)

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

Total release size: 273.9 kB

Release files / pyloxone_api-0.4.2.tar.gz

Download URL pyloxone_api-0.4.2.tar.gz
Size 196.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2e37f4f9641ed1a92f3a4e5d6f0355951d1bbec8f6d2ea8a819599ad01bafffd
BLAKE2b-256 checksum
How to use checksums
76412154d4bb0ee90d58a67298409b65ace60e6fa0d6f77519d4dbc964b0759e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.2-py3-none-any.whl

Download URL pyloxone_api-0.4.2-py3-none-any.whl
Size 77.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e27fd36fae35aadcfd4041b1d94221360c1448014ecfb1689393f0646f4d739
BLAKE2b-256 checksum
How to use checksums
92d08f87167a1d4716b057e1f7f47e29c6d915c5cd96681309a5439af503aea6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.2

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