qubrics-sdk 4.0.0__py3-none-any.whl

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,21 @@
1
+ from __future__ import annotations
2
+
3
+ from importlib import import_module
4
+ from types import ModuleType
5
+
6
+ __all__ = ["core", "mailbox", "management", "sending"]
7
+
8
+ _MODULES = {
9
+ "core": "qubrics.core",
10
+ "mailbox": "qubrics.mailbox",
11
+ "management": "qubrics.management",
12
+ "sending": "qubrics.sending",
13
+ }
14
+
15
+
16
+ def __getattr__(name: str) -> ModuleType:
17
+ if name not in _MODULES:
18
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
19
+ module = import_module(_MODULES[name])
20
+ globals()[name] = module
21
+ return module
@@ -0,0 +1,153 @@
1
+ Metadata-Version: 2.4
2
+ Name: qubrics-sdk
3
+ Version: 4.0.0
4
+ Summary: Umbrella package for the Qubrics Python SDK.
5
+ Project-URL: Repository, https://github.com/qubrics/qubrics-sdk
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Python: >=3.10
15
+ Requires-Dist: qubrics-core<3.0.0,>=2.0.0
16
+ Requires-Dist: qubrics-mailbox<4.0.0,>=3.0.0
17
+ Requires-Dist: qubrics-management<4.0.0,>=3.0.0
18
+ Requires-Dist: qubrics-sending<3.0.0,>=2.0.0
19
+ Description-Content-Type: text/markdown
20
+
21
+ # qubrics-sdk
22
+
23
+ [![PyPI version](https://img.shields.io/pypi/v/qubrics-sdk)](https://pypi.org/project/qubrics-sdk/)
24
+ [![Python versions](https://img.shields.io/pypi/pyversions/qubrics-sdk)](https://pypi.org/project/qubrics-sdk/)
25
+ [![PyPI downloads](https://img.shields.io/pypi/dm/qubrics-sdk)](https://pypi.org/project/qubrics-sdk/)
26
+ [![Licence](https://img.shields.io/pypi/l/qubrics-sdk)](https://github.com/qubrics/qubrics-sdk/blob/main/LICENSE)
27
+
28
+ Optional umbrella package for the Qubrics Python SDK.
29
+
30
+ ## Documentation
31
+
32
+ - Qubrics docs: [qubrics.com/docs](https://qubrics.com/docs)
33
+ - Management API reference: [qubrics.com/docs/api/introduction](https://qubrics.com/docs/api/introduction)
34
+ - Mailbox API reference: [qubrics.com/docs/mailbox-api/introduction](https://qubrics.com/docs/mailbox-api/introduction)
35
+ - Sending API reference: [qubrics.com/docs/sending-api/introduction](https://qubrics.com/docs/sending-api/introduction)
36
+ - Source repository: [qubrics/qubrics-sdk](https://github.com/qubrics/qubrics-sdk)
37
+
38
+ ## Requirements
39
+
40
+ - Python 3.10 or newer.
41
+ - A send-capable `smx_mbx_*` key or owner-approved Sending-resource `smx_agent_*` token for Sending clients.
42
+ - A mailbox-scoped `smx_mbx_*` key or scoped `smx_agent_*` token for Mailbox clients.
43
+ - A root `smx_root_*` key for Management clients.
44
+
45
+ For OAuth, use a REST access token with the scopes and mailbox access required by the operation. See [OAuth for REST APIs](https://qubrics.com/docs/developer-tools/oauth).
46
+
47
+ ## Installation
48
+
49
+ These commands target the Qubrics release of `qubrics-sdk`. Until it is published, install `sendmux-sdk` with its existing import names.
50
+
51
+ ```sh
52
+ pip install qubrics-sdk
53
+ ```
54
+
55
+ ## Connection checks
56
+
57
+ Check a Management credential without creating resources:
58
+
59
+ ```python
60
+ import os
61
+
62
+ from qubrics.sdk import management
63
+
64
+ with management.create_management_client(
65
+ api_key=os.environ["QUBRICS_MANAGEMENT_API_KEY"]
66
+ ) as client:
67
+ connection = management.ConnectionApi(client).management_get_connection()
68
+ print(connection.data.label, connection.data.team.id)
69
+ ```
70
+
71
+ Use `data.label` for the connection name and `data.team.id` for its stable team
72
+ identifier. Each API surface has its own connection operation:
73
+
74
+ | Surface | API class | Method |
75
+ | --- | --- | --- |
76
+ | Management | `management.ConnectionApi` | `management_get_connection()` |
77
+ | Mailbox | `mailbox.MailboxAPIApi` | `mailbox_get_connection()` |
78
+ | Sending | `sending.MetaApi` | `sending_get_connection()` |
79
+
80
+ Create each client with the credential for that surface.
81
+
82
+ ## OAuth access tokens
83
+
84
+ Pass either `api_key` or `access_token`. `access_token` accepts a bare token string or a synchronous callable; the callable is evaluated for each authenticated request. Your application owns token storage, expiry checks and refresh coordination.
85
+
86
+ ```python
87
+ import os
88
+
89
+ from qubrics.sdk import management
90
+
91
+ client = management.create_management_client(
92
+ access_token=lambda: os.environ["QUBRICS_ACCESS_TOKEN"]
93
+ )
94
+ ```
95
+
96
+ ## Usage
97
+
98
+ ```python
99
+ import os
100
+
101
+ from qubrics.sdk import sending
102
+
103
+ client = sending.create_sending_client(api_key=os.environ["QUBRICS_SENDING_API_KEY"])
104
+ api = sending.EmailsApi(client)
105
+
106
+ response = api.sending_send_email(
107
+ sending.EmailSendRequest(
108
+ var_from=sending.Address(email="sender@example.com"),
109
+ to=sending.Address(email="recipient@example.com"),
110
+ subject="Hello from Qubrics",
111
+ html_body="<p>Hello.</p>",
112
+ text_body="Hello.",
113
+ ),
114
+ idempotency_key="email_123",
115
+ )
116
+
117
+ print(response.data.message_id)
118
+ ```
119
+
120
+ The umbrella package lazy-loads:
121
+
122
+ - `core` from `qubrics.core`
123
+ - `sending` from `qubrics.sending`
124
+ - `mailbox` from `qubrics.mailbox`
125
+ - `management` from `qubrics.management`
126
+
127
+ Use the per-surface packages directly when an integration only needs one API surface.
128
+
129
+ ## Provider model migration
130
+
131
+ The `management` module's provider-list responses contain `ProviderListItem` objects instead of `ProviderItem` objects. Detail responses retain `ProviderItem` and require the `variables` map; list items omit that map.
132
+
133
+ To update provider-list callers:
134
+
135
+ 1. Update your requirements to `qubrics-sdk` and regenerate your lockfile. If you pin components directly, update `qubrics-core`, `qubrics-mailbox`, `qubrics-management`, and `qubrics-sending` together.
136
+ 2. Change provider-list annotations and type checks from `management.ProviderItem` to `management.ProviderListItem`. Keep `management.ProviderItem` for detail responses, and include `variables` in detail fixtures (`{}` when none are set).
137
+ 3. Run `python -m pip check` and your provider-list, provider-detail, and sending tests. Confirm list items use `ProviderListItem`, detail fixtures retain their variables, and delivery-group requests serialize the selected group.
138
+
139
+ To roll back, restore the previous SDK and component requirements, lockfile, and affected call sites together.
140
+
141
+ ## Thread message model migration
142
+
143
+ The umbrella's `mailbox` module adopts the thread-specific list response: thread-message results require `meta.thread_id` and expose optional typed `meta.sync_state`, while ordinary message-list results remain thread-independent. Other Mailbox list families expose typed state metadata where applicable.
144
+
145
+ Update `qubrics-sdk`, `qubrics-mailbox`, the lockfile, and affected annotations or fixtures together. To roll back, restore the previous package requirements, lockfile, and call sites together.
146
+
147
+ ## Support
148
+
149
+ Open an issue in [qubrics/qubrics-sdk](https://github.com/qubrics/qubrics-sdk/issues) with the package name, version, and request ID from any API error.
150
+
151
+ ## Licence
152
+
153
+ MIT. See the [licence file](https://github.com/qubrics/qubrics-sdk/blob/main/LICENSE).
@@ -0,0 +1,5 @@
1
+ qubrics/sdk/__init__.py,sha256=0n8YtkSvU97HPdfz80fEFP-876eeMS5jlrd52oSRKeU,551
2
+ qubrics_sdk-4.0.0.dist-info/METADATA,sha256=hcHpZkAchgiYQCD2zV7L4H62pJyOHQHxFpSIeib0Scg,6394
3
+ qubrics_sdk-4.0.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
4
+ qubrics_sdk-4.0.0.dist-info/licenses/LICENSE,sha256=XccNWx2tFkAH2Pa3-YvXoMqXezWGZYItDTB9_YX1u5U,1064
5
+ qubrics_sdk-4.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sendmux
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.