Python library to communicate with Bold Smart Lock (https://boldsmartlock.com)
Project description
Bold Smart Lock Python Package
This package implements the Bold Smart Lock API to authenticate and unlock a Bold smart lock. Usage of this API requires a Bold Connect.
Installation
To install dependencies during development run pip install . from the project directory.
Optionally use the included VSCode Dev Container to get a preconfigured envirionment.
Usage
import asyncio
import aiohttp
from bold_smart_lock.auth import AbstractAuth
from bold_smart_lock.bold_smart_lock import BoldSmartLock
class TestAuth(AbstractAuth):
async def async_get_access_token(self) -> str:
return "00000000-0000-0000-0000-000000000000" # Obtain an access token with oAuth2 and specify it here
async def main():
async with aiohttp.ClientSession() as session:
auth = TestAuth(session)
bold = BoldSmartLock(auth)
# Get the devices and device permissions
get_device_permissions_response = await bold.get_device_permissions()
print(get_device_permissions_response)
# Activate the smart lock by device id
remote_activation_response = await bold.remote_activation(12345)
print(remote_activation_response)
# Deactivate the smart lock by device id
remote_deactivation_response = await bold.remote_deactivation(12345)
print(remote_deactivation_response)
asyncio.run(main())
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
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 bold_smart_lock-0.3.9.tar.gz.
File metadata
- Download URL: bold_smart_lock-0.3.9.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6413d047d7d55ffade5971d9f969b8c023c08d85f76a0cc3e195d683ac4cab8
|
|
| MD5 |
e1386680ccbdaeaf3b2acbc3ae784919
|
|
| BLAKE2b-256 |
5b53c92e6d8ae5e476f29c1128d8472f59fbf0d5a82f785e983bcb19cd51c2b6
|
File details
Details for the file bold_smart_lock-0.3.9-py3-none-any.whl.
File metadata
- Download URL: bold_smart_lock-0.3.9-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a10af9437b5f5de448e6f3def94dc40e2df25ca79f42a08e7be10ab8f6c6a6
|
|
| MD5 |
c0bf2801632f40976d9a4cf98c9b4e73
|
|
| BLAKE2b-256 |
f267ff873f52f872f8213baac46a6134f34dbe10b7a157674ff80a5f25e7706e
|