Skip to main content

yalexs PyPI version Build Status codecov Python Versions

Python API for Yale Access (formerly August) Smart Lock and Doorbell. This is used in Home Assistant 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

API status

This is an unofficial library. As of v9, only the async API (yalexs.api_async.ApiAsync, yalexs.authenticator_async.AuthenticatorAsync) is supported — the synchronous Api / Authenticator classes were removed in v8 (see #141).

The public API key historically embedded in this library is no longer accepted by either backend. Brand.AUGUST (Fortune Brands / Yale Access) now requires an official partner key issued by the vendor. See #167 for context. The Brand.YALE_HOME (Assa Abloy) config was removed in #409 because its key stopped working; Yale Home accounts now authenticate through Brand.YALE_GLOBAL, which requires OAuth via Home Assistant. The usage example below is illustrative — you will need to supply a working key via the brand/API plumbing for it to authenticate against the live service.

Install

pip install yalexs

Classes

AuthenticatorAsync

AuthenticatorAsync handles authentication: signing in, sending a verification code to email or phone, and validating the returned code.

Constructor

Argument Description
api An ApiAsync instance.
login_method Login method, either "phone" or "email".
username If login_method is phone, your full phone number including + and country code; otherwise your email address.
password Account password.
install_id* ID generated when the Yale Access app is installed. If not specified, the authenticator generates one. Providing a previously provisioned install ID skips the verification step.
access_token_cache_file* Path to a token cache file. If set, authentication state is persisted to disk so subsequent runs can skip the login step until the token expires.

* optional

Methods

async_setup_authentication()

Loads cached credentials from access_token_cache_file if present. Call once before async_authenticate().

async_authenticate() -> Authentication

Authenticates with the API. The returned Authentication.state is one of:

  • AuthenticationState.AUTHENTICATED — logged in, access_token is valid.
  • AuthenticationState.REQUIRES_VALIDATION — call async_send_verification_code() then async_validate_verification_code(code).
  • AuthenticationState.BAD_PASSWORD — credentials rejected.
  • AuthenticationState.REQUIRES_AUTHENTICATION — no cached token; call async_authenticate() to obtain one.

If a valid token is already cached, this returns it without contacting the API.

async_send_verification_code() -> bool

Sends a 6-digit verification code to the phone or email tied to the account.

async_validate_verification_code(code: str) -> ValidationResult

Validates the code. Returns ValidationResult.VALIDATED on success or ValidationResult.INVALID_VERIFICATION_CODE otherwise.

async_refresh_access_token(force: bool = False) -> Authentication | None

Refreshes the access token if it is within the renewal threshold (default 7 days before expiry). Pass force=True to refresh unconditionally.

Usage

import asyncio

from aiohttp import ClientSession

from yalexs.alarm import ArmState
from yalexs.api_async import ApiAsync
from yalexs.authenticator_async import AuthenticationState, AuthenticatorAsync
from yalexs.const import Brand


async def main() -> None:
    async with ClientSession() as session:
        api = ApiAsync(session, timeout=20, brand=Brand.AUGUST)
        authenticator = AuthenticatorAsync(
            api,
            "email",
            "EMAIL_ADDRESS",
            "PASSWORD",
            access_token_cache_file="auth.txt",
        )
        await authenticator.async_setup_authentication()
        authentication = await authenticator.async_authenticate()

        if authentication.state is AuthenticationState.REQUIRES_VALIDATION:
            await authenticator.async_send_verification_code()
            code = input("Verification code: ")
            await authenticator.async_validate_verification_code(code)
            authentication = await authenticator.async_authenticate()

        access_token = authentication.access_token

        locks = await api.async_get_locks(access_token)
        for lock in locks:
            print(lock)

        # Alarms (Yale Home brand only)
        if api.brand_supports_alarms:
            alarms = await api.async_get_alarms(access_token)
            if alarms:
                await api.async_arm_alarm(access_token, alarms[0], ArmState.Away)


asyncio.run(main())

Metadata

Release files for yalexs 9.2.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yalexs 9.2.13
File Size Uploaded Provenance
yalexs-9.2.13.tar.gz 46.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yalexs 9.2.13
File Interpreter ABI Platform
yalexs-9.2.13-py3-none-any.whl Python 3 none any Details

Total release size: 100.3 kB

Release files / yalexs-9.2.13.tar.gz

Download URL yalexs-9.2.13.tar.gz
Size 46.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b6753f362b47fec9577ee468e48d10bc7bdac63bc9d3f72f05bec7d23c211191
BLAKE2b-256 checksum
How to use checksums
af9f78cf370ef9018787a6aef4900cb1fb13e28c2a2e91e55842d73345a0a30f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / yalexs-9.2.13-py3-none-any.whl

Download URL yalexs-9.2.13-py3-none-any.whl
Size 54.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf1eff7bd742c3b494da3ff9622bfea21553eec1b5240fbf71f41353d5fac1ca
BLAKE2b-256 checksum
How to use checksums
28e41ca8d17d7bb1750aa88e7c6aa1acc3c209ec0f3a78626168ba1e976d2a4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Security for yalexs 9.2.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for yalexs-9.2.13.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

9.2.13 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page