Asynchronous python bindings for nuki.io bridges.
Project description
aionuki
Asynchronous Python library for interacting with Nuki locks and openers. Forked from pynuki. Refactored to use aiohttp and asyncio.
Supports automatic bridge discovery using nuki.io
servers and interactive authentication without manually entering any token.
Supports parsing callbacks and integrating the result in the object's data structure. Full support of the Nuki API Spec v1.12 PDF Here
Installation
pip install -U aionuki
Usage
import asyncio
from aionuki import NukiBridge
async def main():
bridges = await NukiBridge.discover()
async with (bridges[0])(token=None) as br:
print("Starting the interactive auth procedure.", br)
if not br.token:
print("Received token:", await br.auth())
await br.connect()
lock = (await br.locks)[0]
await lock.lock()
await lock.unlock()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
More info in the examples directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aionuki-2.0.1.tar.gz
(8.3 kB
view details)
Built Distribution
aionuki-2.0.1-py3-none-any.whl
(21.5 kB
view details)
File details
Details for the file aionuki-2.0.1.tar.gz
.
File metadata
- Download URL: aionuki-2.0.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73650e4c2c9bd4f9ac62448a2adfc4837a2265e68f1fe696d2ba5a4f7c7902f5 |
|
MD5 | eb77c3aaa9331120fbf7a6046afddad7 |
|
BLAKE2b-256 | 516b38e36428577a0da251de21d75c17ad60da79246d76e76296719df315c1a8 |
File details
Details for the file aionuki-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: aionuki-2.0.1-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc0d34fb2411be33757d562b77bd4b72dcf55d33d333518fa948e3a9f46d34c3 |
|
MD5 | 4e8350ef69bd3979e3bd77fb50eba157 |
|
BLAKE2b-256 | 481b7382789b3e05572c5a81b570f43fc1bbe9dafa413163e1235f41b3cba137 |