Name | yalexs JSON |
Version |
9.0.1
JSON |
| download |
home_page | None |
Summary | Python API for Yale Access (formerly August) Smart Lock and Doorbell |
upload_time | 2025-08-27 02:17:11 |
maintainer | None |
docs_url | None |
author | J. Nick Koston |
requires_python | <4.0,>=3.10 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# yalexs [](https://badge.fury.io/py/yalexs) [](https://github.com/bdraco/yalexs) [](https://codecov.io/gh/bdraco/yalexs) [](https://pypi.python.org/pypi/yalexs/)
Python API for Yale Access (formerly August) Smart Lock and Doorbell. This is used in [Home Assistant](https://home-assistant.io) but should be generic enough that can be used elsewhere.
## Yale Access formerly August
This library is a fork of Joe Lu's excellent august library from https://github.com/snjoetw/py-august
## Classes
### Authenticator
Authenticator is responsible for all authentication related logic, this includes authentication and verifying the account belongs to the user by sending a verification code to email or phone.
#### Constructor
| Argument | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| api | See Api class. |
| login_method | Login method, either "phone" or "email". |
| username | If you're login_method is phone, then this is your full phone# including "+" and country code; otherwise enter your email address here. |
| password | Password. |
| install_id\* | ID that's generated when Yale Access app is installed. If not specified, Authenticator will auto-generate one. If an install_id is provisioned, then it's good to provide the provisioned install_id as you'll bypass verification process. |
| access_token_cache_file\* | Path to access_token cache file. If specified, access_token info will be cached in the file. Subsequent authentication will utilize information in the file to determine correct authentication state. |
\* means optional
#### Methods
##### authenticate
Authenticates using specified login_method, username and password.
Outcome of this method is an Authentication object. Use Authentication.state figure out authentication state. User is authenticated only if Authentication.state = AuthenticationState.AUTHENTICATED.
If an authenticated access_token is already in the access_token_cache_file, this method will return cached authentication.
##### send_verification_code
Sends a 6-digits verification code to phone or email depending on login_method.
##### validate_verification_code
Validates verification code. This method returns ValidationResult. Check the value to see if verification code is valid or not.
## Install
```bash
pip install yalexs
```
## Usage
```python
import asyncio
from aiohttp import ClientSession
from yalexs.api_async import ApiAsync
from yalexs.authenticator_async import AuthenticatorAsync
from yalexs.const import Brand
from yalexs.alarm import ArmState
async def main():
api = ApiAsync(ClientSession(), timeout=20, brand=Brand.YALE_HOME)
authenticator = AuthenticatorAsync(api, "email", "EMAIL_ADDRESS", "PASSWORD}",
access_token_cache_file="auth.txt",install_id="UUID")
await authenticator.async_setup_authentication()
authentication = await authenticator.async_authenticate()
access_token = authentication.access_token
# if(authentication.state == AuthenticationState.REQUIRES_VALIDATION) :
# await authenticator.async_send_verification_code()
# await authenticator.async_validate_verification_code("12345")
# DO STUFF HERE LIKE GET THE ALARMS, LOCS, ETC....
alarms = await api.async_get_alarms(access_token)
locks = api.get_locks(access_token)
# OR ARM YOUR ALARM
await api.async_arm_alarm(access_token, alarms[0], ArmState.Away)
asyncio.run(main())
```
Raw data
{
"_id": null,
"home_page": null,
"name": "yalexs",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "J. Nick Koston",
"author_email": "nick@koston.org",
"download_url": "https://files.pythonhosted.org/packages/3b/7a/45619b746a7bfbca88c95d146c51141aa3ace421a12d9f012d4e846ca3ad/yalexs-9.0.1.tar.gz",
"platform": null,
"description": "# yalexs [](https://badge.fury.io/py/yalexs) [](https://github.com/bdraco/yalexs) [](https://codecov.io/gh/bdraco/yalexs) [](https://pypi.python.org/pypi/yalexs/)\n\nPython API for Yale Access (formerly August) Smart Lock and Doorbell. This is used in [Home Assistant](https://home-assistant.io) but should be generic enough that can be used elsewhere.\n\n## Yale Access formerly August\n\nThis library is a fork of Joe Lu's excellent august library from https://github.com/snjoetw/py-august\n\n## Classes\n\n### Authenticator\n\nAuthenticator is responsible for all authentication related logic, this includes authentication and verifying the account belongs to the user by sending a verification code to email or phone.\n\n#### Constructor\n\n| Argument | Description |\n| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| api | See Api class. |\n| login_method | Login method, either \"phone\" or \"email\". |\n| username | If you're login_method is phone, then this is your full phone# including \"+\" and country code; otherwise enter your email address here. |\n| password | Password. |\n| install_id\\* | ID that's generated when Yale Access app is installed. If not specified, Authenticator will auto-generate one. If an install_id is provisioned, then it's good to provide the provisioned install_id as you'll bypass verification process. |\n| access_token_cache_file\\* | Path to access_token cache file. If specified, access_token info will be cached in the file. Subsequent authentication will utilize information in the file to determine correct authentication state. |\n\n\\* means optional\n\n#### Methods\n\n##### authenticate\n\nAuthenticates using specified login_method, username and password.\n\nOutcome of this method is an Authentication object. Use Authentication.state figure out authentication state. User is authenticated only if Authentication.state = AuthenticationState.AUTHENTICATED.\n\nIf an authenticated access_token is already in the access_token_cache_file, this method will return cached authentication.\n\n##### send_verification_code\n\nSends a 6-digits verification code to phone or email depending on login_method.\n\n##### validate_verification_code\n\nValidates verification code. This method returns ValidationResult. Check the value to see if verification code is valid or not.\n\n## Install\n\n```bash\npip install yalexs\n```\n\n## Usage\n\n```python\nimport asyncio\nfrom aiohttp import ClientSession\n\nfrom yalexs.api_async import ApiAsync\nfrom yalexs.authenticator_async import AuthenticatorAsync\nfrom yalexs.const import Brand\nfrom yalexs.alarm import ArmState\n\n\nasync def main():\n api = ApiAsync(ClientSession(), timeout=20, brand=Brand.YALE_HOME)\n authenticator = AuthenticatorAsync(api, \"email\", \"EMAIL_ADDRESS\", \"PASSWORD}\",\n access_token_cache_file=\"auth.txt\",install_id=\"UUID\")\n await authenticator.async_setup_authentication()\n authentication = await authenticator.async_authenticate()\n access_token = authentication.access_token\n\n # if(authentication.state == AuthenticationState.REQUIRES_VALIDATION) :\n # await authenticator.async_send_verification_code()\n # await authenticator.async_validate_verification_code(\"12345\")\n\n # DO STUFF HERE LIKE GET THE ALARMS, LOCS, ETC....\n alarms = await api.async_get_alarms(access_token)\n locks = api.get_locks(access_token)\n\n # OR ARM YOUR ALARM\n await api.async_arm_alarm(access_token, alarms[0], ArmState.Away)\n\n\n\nasyncio.run(main())\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python API for Yale Access (formerly August) Smart Lock and Doorbell",
"version": "9.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/bdraco/yalexs/issues",
"Changelog": "https://github.com/bdraco/yalexs/blob/main/CHANGELOG.md",
"Documentation": "https://yalexs.readthedocs.io",
"Repository": "https://github.com/bdraco/yalexs"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8194a04b3aed2a7f2f0dfe7869b85cde87f75acf78aa30403f7049cd122287f8",
"md5": "431af4014ed30ba3343750bbe0e1f2b6",
"sha256": "5f987db1e1445868f72dbb9e1fd581c3d22b2aab094f3c3783bf171439c4ed68"
},
"downloads": -1,
"filename": "yalexs-9.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "431af4014ed30ba3343750bbe0e1f2b6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 50619,
"upload_time": "2025-08-27T02:17:10",
"upload_time_iso_8601": "2025-08-27T02:17:10.336930Z",
"url": "https://files.pythonhosted.org/packages/81/94/a04b3aed2a7f2f0dfe7869b85cde87f75acf78aa30403f7049cd122287f8/yalexs-9.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3b7a45619b746a7bfbca88c95d146c51141aa3ace421a12d9f012d4e846ca3ad",
"md5": "5d26d6bda6a478edea619e9df3d6fcfd",
"sha256": "f08f433588eaf70c93eed7ecc46ea455e1fd0a04ab4bd7e11022fb82c85865da"
},
"downloads": -1,
"filename": "yalexs-9.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5d26d6bda6a478edea619e9df3d6fcfd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 43009,
"upload_time": "2025-08-27T02:17:11",
"upload_time_iso_8601": "2025-08-27T02:17:11.996311Z",
"url": "https://files.pythonhosted.org/packages/3b/7a/45619b746a7bfbca88c95d146c51141aa3ace421a12d9f012d4e846ca3ad/yalexs-9.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-27 02:17:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bdraco",
"github_project": "yalexs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "yalexs"
}