Skip to main content

pydanalock-cloud

PyPI version CI

Unofficial Python client for the Danalock cloud API: OAuth2 authentication, device listing, and retrieval of the per-device key material (login token blob, broadcast key) used by BLE clients such as pydanalock-ble.

Disclaimer. This project is unofficial and is not affiliated with, endorsed by, or sponsored by Danalock AS or Poly-Control. It is built for interoperability with devices you own. Use it at your own risk; only control devices you are authorized to control.

Install

pip install pydanalock-cloud

Status

OAuth2 authentication, device/key retrieval, forced key refresh, client lifecycle, and latest firmware lookup are implemented (specs 0001–0006); 0.x — the API may still change. See specs/ for the specifications and their status.

Capabilities:

  • OAuth2 authentication (refresh + password grants) with pluggable token storage — spec 0001
  • Device listing and key retrieval with automatic refresh — spec 0002
  • Public sync + async client API (DanalockCloud, AsyncDanalockCloud, DeviceKey) — spec 0003
  • Client lifecycle close methods — spec 0004
  • Forced key refetch (get_key(..., force=True)) — spec 0005
  • Latest firmware lookup (unauthenticated firmware service; the download URL in the result is a short-lived signed link and must not be persisted) — spec 0006

Requirements

  • Python >= 3.11
  • httpx >= 0.27

Development

python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/ruff check .
.venv/bin/ruff format --check .
.venv/bin/mypy
.venv/bin/pytest -m "not live"

Live tests against the production API stay behind the live marker and are run manually only, with credentials from the environment (DANALOCK_USERNAME, DANALOCK_PASSWORD).

License

MIT

Download files

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

Source Distribution

pydanalock_cloud-0.5.1.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

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

pydanalock_cloud-0.5.1-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file pydanalock_cloud-0.5.1.tar.gz.

File metadata

  • Download URL: pydanalock_cloud-0.5.1.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pydanalock_cloud-0.5.1.tar.gz
Algorithm Hash digest
SHA256 ad3ba262b495e5381e306fe49aab4b9abb90e14f01cb4245c2d36a17a6b0f696
MD5 810647d15dc8e72459aa3d69d0fffd82
BLAKE2b-256 390229b86981bfa0686f44347815b177b87c877b646acc2f4e3cd71ec1844d2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydanalock_cloud-0.5.1.tar.gz:

Publisher: publish.yml on buggy-shep/pydanalock-cloud

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

File details

Details for the file pydanalock_cloud-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pydanalock_cloud-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa7ca6d56e2904ac862c71876f04d7f0f667a3c47e59a745a258ac2ac91f8f4b
MD5 50e62150c787f3d7576060a919e9fded
BLAKE2b-256 b7312b8a52f486cd1f0cb66cd1cc8daffb1193ffce8dcc32211dbdede76fdf75

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydanalock_cloud-0.5.1-py3-none-any.whl:

Publisher: publish.yml on buggy-shep/pydanalock-cloud

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

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 files

0.5.0

2 files

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