Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openmates-0.14.0a0.tar.gz (57.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openmates-0.14.0a0-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

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

Hashes for openmates-0.14.0a0.tar.gz
Algorithm Hash digest
SHA256 f661e6d9ce12691eeaaede3fb564de4aaa690e605b8cb5b18946fd83c276d0a6
MD5 45ecf6f2b6808f5245f23dd2dc3318fd
BLAKE2b-256 532e69230b12356d02df49d0e35cadd0a9b836621dbe782f6665b47fe3695ac9

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmates-0.14.0a0.tar.gz:

Publisher: publish-python-sdk.yml on glowingkitty/OpenMates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for openmates-0.14.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 a387df1106fd9272e21485fa0e2a7e19c633d388d1144513f9cfbddd5a8ac4a3
MD5 9cab738744713f9f1edc4127292b39bb
BLAKE2b-256 344398ea1f91c7c97ced3a6cb59758507636f5df62950be3c8d74c59cce94c3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmates-0.14.0a0-py3-none-any.whl:

Publisher: publish-python-sdk.yml on glowingkitty/OpenMates

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page