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

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.0.tar.gz (31.9 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.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydanalock_cloud-0.5.0.tar.gz
  • Upload date:
  • Size: 31.9 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.0.tar.gz
Algorithm Hash digest
SHA256 b80a0f6995ed208c8192e3e94cabd5c2bd153ac27dcf89b9760e989ac25141c5
MD5 7c5e7ac262cd651c8939552e57c0d291
BLAKE2b-256 a48463097d552ad6911acb32351f5416ce89c66daa6bb297fff2e21cb2f61494

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydanalock_cloud-0.5.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pydanalock_cloud-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d798beb53486d6e564085a57867a86479c052ce395d4c3cecc7d9377a9aca797
MD5 b0211b295bac278bd3dd75d63a9d561c
BLAKE2b-256 08a4b8920791e1fd63aa04ae39698265d7fe4c08c137f5b0aeb8d384ede9e07d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydanalock_cloud-0.5.0-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

0.5.1

2 files

This release

0.5.0 This release

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