pydanalock-cloud
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad3ba262b495e5381e306fe49aab4b9abb90e14f01cb4245c2d36a17a6b0f696
|
|
| MD5 |
810647d15dc8e72459aa3d69d0fffd82
|
|
| BLAKE2b-256 |
390229b86981bfa0686f44347815b177b87c877b646acc2f4e3cd71ec1844d2d
|
Provenance
The following attestation bundles were made for pydanalock_cloud-0.5.1.tar.gz:
Publisher:
publish.yml on buggy-shep/pydanalock-cloud
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydanalock_cloud-0.5.1.tar.gz -
Subject digest:
ad3ba262b495e5381e306fe49aab4b9abb90e14f01cb4245c2d36a17a6b0f696 - Sigstore transparency entry: 2786358969
- Sigstore integration time:
-
Permalink:
buggy-shep/pydanalock-cloud@0aff27faa0c7aa884c908b7a77cdeeec9990dc62 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/buggy-shep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0aff27faa0c7aa884c908b7a77cdeeec9990dc62 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pydanalock_cloud-0.5.1-py3-none-any.whl.
File metadata
- Download URL: pydanalock_cloud-0.5.1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa7ca6d56e2904ac862c71876f04d7f0f667a3c47e59a745a258ac2ac91f8f4b
|
|
| MD5 |
50e62150c787f3d7576060a919e9fded
|
|
| BLAKE2b-256 |
b7312b8a52f486cd1f0cb66cd1cc8daffb1193ffce8dcc32211dbdede76fdf75
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydanalock_cloud-0.5.1-py3-none-any.whl -
Subject digest:
fa7ca6d56e2904ac862c71876f04d7f0f667a3c47e59a745a258ac2ac91f8f4b - Sigstore transparency entry: 2786358994
- Sigstore integration time:
-
Permalink:
buggy-shep/pydanalock-cloud@0aff27faa0c7aa884c908b7a77cdeeec9990dc62 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/buggy-shep
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0aff27faa0c7aa884c908b7a77cdeeec9990dc62 -
Trigger Event:
release
-
Statement type: