openmates 0.14.0a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: openmates
3
+ Version: 0.14.0a0
4
+ Summary: OpenMates Python SDK
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: requests>=2.31
9
+ Requires-Dist: cryptography>=41
10
+
11
+ # openmates
12
+
13
+ Python SDK for OpenMates API-key access to app skills and encrypted chat workflows.
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install openmates
19
+ ```
20
+
21
+ ## API Key
22
+
23
+ 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.
24
+
25
+ Set the key in your environment:
26
+
27
+ ```bash
28
+ export OPENMATES_API_KEY="sk-api-..."
29
+ ```
30
+
31
+ New SDK devices are blocked until approved in Settings > Developers > Devices.
32
+
33
+ ## Usage
34
+
35
+ ```python
36
+ from openmates import OpenMates
37
+
38
+ om = OpenMates() # reads OPENMATES_API_KEY
39
+
40
+ result = om.apps.web.search({
41
+ "requests": [{"query": "OpenMates SDK examples"}],
42
+ })
43
+ ```
44
+
45
+ SDK methods authenticate lazily; there is no `connect()` call.
46
+
47
+ List encrypted account chats. The default limit is 10; pass `limit=0` only when you intentionally want all account chats:
48
+
49
+ ```python
50
+ latest_chats = om.chats.list()
51
+ all_chats = om.chats.list(limit=0)
52
+ ```
53
+
54
+ Create a non-persistent chat. This is the default and does not save the transcript to your OpenMates account:
55
+
56
+ ```python
57
+ response = om.chats.send("Summarize this release note draft.")
58
+ print(response.content)
59
+ ```
60
+
61
+ Create a saved account chat explicitly:
62
+
63
+ ```python
64
+ om.chats.send("Create a project kickoff checklist.", save_to_account=True)
65
+
66
+ om.billing.overview()
67
+ om.billing.invoices()
68
+ om.docs.search("api keys")
69
+ ```
70
+
71
+ ## Errors
72
+
73
+ The SDK raises `OpenMatesConfigError` for missing configuration and `OpenMatesApiError` for API responses such as expired keys, unapproved devices, missing scopes, or exceeded credit limits.
74
+
75
+ Full source docs: `docs/user-guide/developers/sdk.md` in the OpenMates repository.
76
+
77
+ ## Publishing
78
+
79
+ Maintainers publish this package through PyPI Trusted Publishing from GitHub
80
+ Actions. See `docs/contributing/guides/publish-python-sdk.md` for first-time
81
+ PyPI setup, versioning rules, and the automated `dev`/`main` release flow.
@@ -0,0 +1,71 @@
1
+ # openmates
2
+
3
+ Python SDK for OpenMates API-key access to app skills and encrypted chat workflows.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pip install openmates
9
+ ```
10
+
11
+ ## API Key
12
+
13
+ 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.
14
+
15
+ Set the key in your environment:
16
+
17
+ ```bash
18
+ export OPENMATES_API_KEY="sk-api-..."
19
+ ```
20
+
21
+ New SDK devices are blocked until approved in Settings > Developers > Devices.
22
+
23
+ ## Usage
24
+
25
+ ```python
26
+ from openmates import OpenMates
27
+
28
+ om = OpenMates() # reads OPENMATES_API_KEY
29
+
30
+ result = om.apps.web.search({
31
+ "requests": [{"query": "OpenMates SDK examples"}],
32
+ })
33
+ ```
34
+
35
+ SDK methods authenticate lazily; there is no `connect()` call.
36
+
37
+ List encrypted account chats. The default limit is 10; pass `limit=0` only when you intentionally want all account chats:
38
+
39
+ ```python
40
+ latest_chats = om.chats.list()
41
+ all_chats = om.chats.list(limit=0)
42
+ ```
43
+
44
+ Create a non-persistent chat. This is the default and does not save the transcript to your OpenMates account:
45
+
46
+ ```python
47
+ response = om.chats.send("Summarize this release note draft.")
48
+ print(response.content)
49
+ ```
50
+
51
+ Create a saved account chat explicitly:
52
+
53
+ ```python
54
+ om.chats.send("Create a project kickoff checklist.", save_to_account=True)
55
+
56
+ om.billing.overview()
57
+ om.billing.invoices()
58
+ om.docs.search("api keys")
59
+ ```
60
+
61
+ ## Errors
62
+
63
+ The SDK raises `OpenMatesConfigError` for missing configuration and `OpenMatesApiError` for API responses such as expired keys, unapproved devices, missing scopes, or exceeded credit limits.
64
+
65
+ Full source docs: `docs/user-guide/developers/sdk.md` in the OpenMates repository.
66
+
67
+ ## Publishing
68
+
69
+ Maintainers publish this package through PyPI Trusted Publishing from GitHub
70
+ Actions. See `docs/contributing/guides/publish-python-sdk.md` for first-time
71
+ PyPI setup, versioning rules, and the automated `dev`/`main` release flow.
@@ -0,0 +1,11 @@
1
+ """OpenMates Python SDK public exports.
2
+
3
+ Purpose: expose the ergonomic Python API-key SDK entrypoint.
4
+ Architecture: thin package barrel over openmates.sdk.
5
+ Security: API keys are passed through at request time and never persisted.
6
+ Tests: packages/openmates-python/tests/test_sdk.py.
7
+ """
8
+
9
+ from .sdk import OpenMates, OpenMatesApiError, OpenMatesConfigError
10
+
11
+ __all__ = ["OpenMates", "OpenMatesApiError", "OpenMatesConfigError"]
@@ -0,0 +1,7 @@
1
+ """Generated OpenMates Python SDK modules.
2
+
3
+ Purpose: package generated native app-skill namespaces.
4
+ Architecture: docs/specs/sdk-cli-parity-v1/spec.yml.
5
+ Security: generated wrappers delegate to the API-key SDK client.
6
+ Tests: packages/openmates-python/tests/test_sdk_generator.py.
7
+ """