OpenMates Python SDK
Project description
openmates
Python SDK for OpenMates API-key access to app skills and encrypted chat workflows.
Install
pip install openmates
API Key
Create an API key in OpenMates under Settings > Developers > API Keys. The guided flow asks for scope, credit limit, and expiration before revealing the key once.
Set the key in your environment:
export OPENMATES_API_KEY="sk-api-..."
New SDK devices are blocked until approved in Settings > Developers > Devices.
Usage
from openmates import OpenMates
om = OpenMates() # reads OPENMATES_API_KEY
result = om.apps.web.search({
"requests": [{"query": "OpenMates SDK examples"}],
})
SDK methods authenticate lazily; there is no connect() call.
List encrypted account chats. The default limit is 10; pass limit=0 only when you intentionally want all account chats:
latest_chats = om.chats.list()
all_chats = om.chats.list(limit=0)
Create a non-persistent chat. This is the default and does not save the transcript to your OpenMates account:
response = om.chats.send("Summarize this release note draft.")
print(response.content)
Create a saved account chat explicitly:
om.chats.send("Create a project kickoff checklist.", save_to_account=True)
om.billing.overview()
om.billing.invoices()
om.docs.search("api keys")
Errors
The SDK raises OpenMatesConfigError for missing configuration and OpenMatesApiError for API responses such as expired keys, unapproved devices, missing scopes, or exceeded credit limits.
Full source docs: docs/user-guide/developers/sdk.md in the OpenMates repository.
Publishing
Maintainers publish this package through PyPI Trusted Publishing from GitHub
Actions. See docs/contributing/guides/publish-python-sdk.md for first-time
PyPI setup, versioning rules, and the automated dev/main release flow.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openmates-0.14.0a0.tar.gz.
File metadata
- Download URL: openmates-0.14.0a0.tar.gz
- Upload date:
- Size: 57.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f661e6d9ce12691eeaaede3fb564de4aaa690e605b8cb5b18946fd83c276d0a6
|
|
| MD5 |
45ecf6f2b6808f5245f23dd2dc3318fd
|
|
| BLAKE2b-256 |
532e69230b12356d02df49d0e35cadd0a9b836621dbe782f6665b47fe3695ac9
|
Provenance
The following attestation bundles were made for openmates-0.14.0a0.tar.gz:
Publisher:
publish-python-sdk.yml on glowingkitty/OpenMates
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openmates-0.14.0a0.tar.gz -
Subject digest:
f661e6d9ce12691eeaaede3fb564de4aaa690e605b8cb5b18946fd83c276d0a6 - Sigstore transparency entry: 2118097092
- Sigstore integration time:
-
Permalink:
glowingkitty/OpenMates@a36cb915fe1f3cb94e69e907b4e1929ce821ab64 -
Branch / Tag:
refs/heads/dev - Owner: https://github.com/glowingkitty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@a36cb915fe1f3cb94e69e907b4e1929ce821ab64 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file openmates-0.14.0a0-py3-none-any.whl.
File metadata
- Download URL: openmates-0.14.0a0-py3-none-any.whl
- Upload date:
- Size: 51.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a387df1106fd9272e21485fa0e2a7e19c633d388d1144513f9cfbddd5a8ac4a3
|
|
| MD5 |
9cab738744713f9f1edc4127292b39bb
|
|
| BLAKE2b-256 |
344398ea1f91c7c97ced3a6cb59758507636f5df62950be3c8d74c59cce94c3a
|
Provenance
The following attestation bundles were made for openmates-0.14.0a0-py3-none-any.whl:
Publisher:
publish-python-sdk.yml on glowingkitty/OpenMates
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openmates-0.14.0a0-py3-none-any.whl -
Subject digest:
a387df1106fd9272e21485fa0e2a7e19c633d388d1144513f9cfbddd5a8ac4a3 - Sigstore transparency entry: 2118097150
- Sigstore integration time:
-
Permalink:
glowingkitty/OpenMates@a36cb915fe1f3cb94e69e907b4e1929ce821ab64 -
Branch / Tag:
refs/heads/dev - Owner: https://github.com/glowingkitty
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk.yml@a36cb915fe1f3cb94e69e907b4e1929ce821ab64 -
Trigger Event:
workflow_dispatch
-
Statement type: