Skip to main content

OpenMates Python SDK

Project description

openmates

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.1a0.tar.gz (58.1 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.1a0-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

Details for the file openmates-0.14.1a0.tar.gz.

File metadata

  • Download URL: openmates-0.14.1a0.tar.gz
  • Upload date:
  • Size: 58.1 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.1a0.tar.gz
Algorithm Hash digest
SHA256 af60d3ab8a89d0d0257a5f293973d1c6f1552f12ea8bcfe3d9dfdfced6b5c9f0
MD5 2e6e467da58f84794aadb131d7aee53e
BLAKE2b-256 ce6201df8a05fc5b20307adbb42fd54d04a8a73341306f5e2eb5a8100442c0e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmates-0.14.1a0.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.1a0-py3-none-any.whl.

File metadata

  • Download URL: openmates-0.14.1a0-py3-none-any.whl
  • Upload date:
  • Size: 51.7 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.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb5eb249b1f180d7c64d7defed18014cb8b78edadcba6e33f6a56ca9a7125c18
MD5 45ea3da0276797cc23124c65469c7b82
BLAKE2b-256 5736be3ae2e507c60e5c0aadeca5d2d63ded71f5d835910971a1fcb352f53222

See more details on using hashes here.

Provenance

The following attestation bundles were made for openmates-0.14.1a0-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