bold-smart-lock


Namebold-smart-lock JSON
Version 0.3.9 PyPI version JSON
download
home_pagehttps://github.com/westenberg/bold_smart_lock
SummaryPython library to communicate with Bold Smart Lock (https://boldsmartlock.com)
upload_time2023-01-31 09:19:58
maintainer
docs_urlNone
authorWestenberg
requires_python
licenseMIT
keywords bold smart lock home automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```python
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())
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/westenberg/bold_smart_lock",
    "name": "bold-smart-lock",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "bold,smart lock,home automation",
    "author": "Westenberg",
    "author_email": "lauren@westenberg.dev",
    "download_url": "https://files.pythonhosted.org/packages/5b/53/c92e6d8ae5e476f29c1128d8472f59fbf0d5a82f785e983bcb19cd51c2b6/bold_smart_lock-0.3.9.tar.gz",
    "platform": null,
    "description": "# Bold Smart Lock Python Package\nThis package implements the Bold Smart Lock API to authenticate and unlock a Bold smart lock. Usage of this API requires a Bold Connect.\n\n## Installation\nTo install dependencies during development run ```pip install .``` from the project directory.\nOptionally use the included VSCode Dev Container to get a preconfigured envirionment.\n\n## Usage\n\n```python\nimport asyncio\nimport aiohttp\nfrom bold_smart_lock.auth import AbstractAuth\n\nfrom bold_smart_lock.bold_smart_lock import BoldSmartLock\n\nclass TestAuth(AbstractAuth):\n    async def async_get_access_token(self) -> str:\n        return \"00000000-0000-0000-0000-000000000000\"  # Obtain an access token with oAuth2 and specify it here\n\nasync def main():\n  async with aiohttp.ClientSession() as session:\n    auth = TestAuth(session)\n    bold = BoldSmartLock(auth)\n\n    # Get the devices and device permissions\n    get_device_permissions_response = await bold.get_device_permissions()\n    print(get_device_permissions_response)\n\n    # Activate the smart lock by device id\n    remote_activation_response = await bold.remote_activation(12345)\n    print(remote_activation_response)\n\n    # Deactivate the smart lock by device id\n    remote_deactivation_response = await bold.remote_deactivation(12345)\n    print(remote_deactivation_response)\n\nasyncio.run(main())\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python library to communicate with Bold Smart Lock (https://boldsmartlock.com)",
    "version": "0.3.9",
    "split_keywords": [
        "bold",
        "smart lock",
        "home automation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f267ff873f52f872f8213baac46a6134f34dbe10b7a157674ff80a5f25e7706e",
                "md5": "c0bf2801632f40976d9a4cf98c9b4e73",
                "sha256": "58a10af9437b5f5de448e6f3def94dc40e2df25ca79f42a08e7be10ab8f6c6a6"
            },
            "downloads": -1,
            "filename": "bold_smart_lock-0.3.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0bf2801632f40976d9a4cf98c9b4e73",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5518,
            "upload_time": "2023-01-31T09:19:57",
            "upload_time_iso_8601": "2023-01-31T09:19:57.042509Z",
            "url": "https://files.pythonhosted.org/packages/f2/67/ff873f52f872f8213baac46a6134f34dbe10b7a157674ff80a5f25e7706e/bold_smart_lock-0.3.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b53c92e6d8ae5e476f29c1128d8472f59fbf0d5a82f785e983bcb19cd51c2b6",
                "md5": "e1386680ccbdaeaf3b2acbc3ae784919",
                "sha256": "f6413d047d7d55ffade5971d9f969b8c023c08d85f76a0cc3e195d683ac4cab8"
            },
            "downloads": -1,
            "filename": "bold_smart_lock-0.3.9.tar.gz",
            "has_sig": false,
            "md5_digest": "e1386680ccbdaeaf3b2acbc3ae784919",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4339,
            "upload_time": "2023-01-31T09:19:58",
            "upload_time_iso_8601": "2023-01-31T09:19:58.714380Z",
            "url": "https://files.pythonhosted.org/packages/5b/53/c92e6d8ae5e476f29c1128d8472f59fbf0d5a82f785e983bcb19cd51c2b6/bold_smart_lock-0.3.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-31 09:19:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "westenberg",
    "github_project": "bold_smart_lock",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bold-smart-lock"
}
        
Elapsed time: 0.05784s