Skip to main content

Yama

The official Python client for the Yama access-control API.

PyPI Python versions CI MIT licence


Docs: https://yass-ltd.github.io/yama-python/ · REST API: https://app.yamasystems.com/api/v2/docs/ · Source: https://github.com/YASS-Ltd/yama-python


Manage a building's access codes and read its call log from Python. The client handles auth, pagination, retries and errors, and gives you typed objects back.

Install

uv add yama-client  # or: pip install yama-client

Quick start

Create an API key in the Yama portal under Settings › API keys, with read access to access codes and the call log, and set it as YAMA_API_KEY. Keep it out of source control.

from datetime import datetime, timezone

from yama import Yama

client = Yama()  # reads YAMA_API_KEY

for code in client.codes.list():
    print(code.name, code.expires_at)

start = datetime(2026, 10, 1, tzinfo=timezone.utc)
end = datetime(2026, 11, 1, tzinfo=timezone.utc)  # exclusive: all of October
for call in client.calls.list(start=start, end=end):
    print(call.started_at, call.result)

What you get

  • Typed: Pydantic models with UTC-aware datetimes, so your editor autocompletes.
  • Every item: iterating a list yields every item, and each call in the call log comes once.
  • Safe retries: on 429 (honouring Retry-After), 5xx and network errors, for every call, creates included: a code is never created twice.
  • Clear errors: one exception class per kind of failure, listed in the docs.
  • Forward-compatible: new fields and enum values from the API don't break your code.
  • Small: two dependencies, httpx and Pydantic. Python 3.10 and newer.

Versioning

SemVer, targeting version 2 of the Yama API (/api/v2/). Release notes are on GitHub Releases.

Contributing

Bug reports and ideas are welcome in issues. Development uses uv and just: just check runs everything CI does. Report security issues privately; see SECURITY.md.

Licence

MIT © Yama Access Software Systems Ltd.

Metadata

Release files for yama-client 0.1.0

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

Source distribution (sdist)

Source distribution for yama-client 0.1.0
File Size Uploaded
yama_client-0.1.0.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yama-client 0.1.0
File Interpreter ABI Platform
yama_client-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / yama_client-0.1.0.tar.gz

Download URL yama_client-0.1.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8f64605a3710525138c2e3ea7834678f59638d42eebbbca6817daa697fa1389e
BLAKE2b-256 checksum
How to use checksums
50962babba6d2a082d6c37d4c51bea74fee682d27a6cf397320db8422423cc71
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 Oct 16, 2026.

Transparency log

Release files / yama_client-0.1.0-py3-none-any.whl

Download URL yama_client-0.1.0-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce56ff2c50b69a1141ea153280b00f20687baa948273780a0dd321bfbafd783e
BLAKE2b-256 checksum
How to use checksums
e174e16137c891197d85006089a8d2b4ab084324db9ae1d468da36fa78e1195f
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 Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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