AlmaAPITK¶
A Python toolkit for the Ex Libris Alma ILS REST API.
AlmaAPITK gives you a clean, typed, domain-oriented client for Alma: a single
AlmaAPIClient for transport, focused domain classes for operations, a
consistent AlmaResponse wrapper, a structured error hierarchy, and built-in
logging with automatic credential and PII redaction.
Install¶
Quick example¶
from almaapitk import AlmaAPIClient, Users
client = AlmaAPIClient("SANDBOX") # reads ALMA_SB_API_KEY
users = Users(client)
user = users.get_user("<user_primary_id>")
print(user.data["first_name"])
Where to go next¶
- Getting Started — install, configure credentials, make your first calls.
- Examples — runnable snippets for every domain.
- Error Handling — the exception hierarchy and Alma error codes.
- Logging — structured logs with automatic redaction.
- API Reference — every public class and method, generated from the source docstrings.
Why AlmaAPITK¶
- Client–Domain design —
AlmaAPIClientowns transport (sessions, retries, rate limiting); domain classes own operations. - Environment-aware — first-class SANDBOX and PRODUCTION support with per-environment credentials.
- Consistent responses —
AlmaResponseexposes.data,.json(), and.successeverywhere. - Typed errors — catch
AlmaValidationError,AlmaRateLimitError,AlmaAuthenticationError, and more — all underAlmaAPIError. - Safe by default — request/response logging redacts API keys and personal data automatically.