Skip to main content

Yama

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

PyPI Python versions CI MIT licence


Docs: https://python.yamasystems.com/ · 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.2.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.2.0
File Size Uploaded
yama_client-0.2.0.tar.gz 22.1 kB Details

Built distribution (wheel)

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

Total release size: 47.3 kB

Release files / yama_client-0.2.0.tar.gz

Download URL yama_client-0.2.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e46bd7905279371569c9b2a0cd9f22f4274b95691c3d4dbffa64b74959bd2876
BLAKE2b-256 checksum
How to use checksums
e41df87e8cb9c3b9b542171d7d4e9bd470a5648e196b0a309d359514dab308ae
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 18, 2026.

Transparency log

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

Download URL yama_client-0.2.0-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64e8e8c6fe68094461e1ff9d88056b714d95727a73b32325d10d840a464efad5
BLAKE2b-256 checksum
How to use checksums
7d01e281c57946c37443eff0344547f975290e2c1b25da9bfec86426f8839b10
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 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

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