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.1

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.1
File Size Uploaded Provenance
yama_client-0.2.1.tar.gz 22.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 47.6 kB

Release files / yama_client-0.2.1.tar.gz

Download URL yama_client-0.2.1.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fb0297b49e50831e3dc57136c8af86ab194889bc87cbb035d4135812a4f665ee
BLAKE2b-256 checksum
How to use checksums
f89b6accd4875f643bc6d7d2d16749f8371e721434d839441607afa27606674f
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 25, 2026.

Transparency log

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

Download URL yama_client-0.2.1-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b5ecfb1eb96bffb7635a25cf4ac3ef8e69cf3f77d008fe5dee6d6c05c70dddf
BLAKE2b-256 checksum
How to use checksums
a430117814d3dc618a13afd9ed0628981010eec45a19d7362164d1f8a88c91ae
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 25, 2026.

Transparency log

Security for yama-client 0.2.1

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 yama_client-0.2.1.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 Oct 25, 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.

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