qubrics-sdk
Optional umbrella package for the Qubrics Python SDK.
Documentation
- Qubrics docs: qubrics.com/docs
- Management API reference: qubrics.com/docs/api/introduction
- Mailbox API reference: qubrics.com/docs/mailbox-api/introduction
- Sending API reference: qubrics.com/docs/sending-api/introduction
- Source repository: qubrics/qubrics-sdk
Requirements
- Python 3.10 or newer.
- A send-capable
smx_mbx_*key or owner-approved Sending-resourcesmx_agent_*token for Sending clients. - A mailbox-scoped
smx_mbx_*key or scopedsmx_agent_*token for Mailbox clients. - A root
smx_root_*key for Management clients.
For OAuth, use a REST access token with the scopes and mailbox access required by the operation. See OAuth for REST APIs.
Installation
These commands target the Qubrics release of qubrics-sdk. Until it is published, install sendmux-sdk with its existing import names.
pip install qubrics-sdk
Connection checks
Check a Management credential without creating resources:
import os
from qubrics.sdk import management
with management.create_management_client(
api_key=os.environ["QUBRICS_MANAGEMENT_API_KEY"]
) as client:
connection = management.ConnectionApi(client).management_get_connection()
print(connection.data.label, connection.data.team.id)
Use data.label for the connection name and data.team.id for its stable team
identifier. Each API surface has its own connection operation:
| Surface | API class | Method |
|---|---|---|
| Management | management.ConnectionApi |
management_get_connection() |
| Mailbox | mailbox.MailboxAPIApi |
mailbox_get_connection() |
| Sending | sending.MetaApi |
sending_get_connection() |
Create each client with the credential for that surface.
OAuth access tokens
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.
import os
from qubrics.sdk import management
client = management.create_management_client(
access_token=lambda: os.environ["QUBRICS_ACCESS_TOKEN"]
)
Usage
import os
from qubrics.sdk import sending
client = sending.create_sending_client(api_key=os.environ["QUBRICS_SENDING_API_KEY"])
api = sending.EmailsApi(client)
response = api.sending_send_email(
sending.EmailSendRequest(
var_from=sending.Address(email="sender@example.com"),
to=sending.Address(email="recipient@example.com"),
subject="Hello from Qubrics",
html_body="<p>Hello.</p>",
text_body="Hello.",
),
idempotency_key="email_123",
)
print(response.data.message_id)
The umbrella package lazy-loads:
corefromqubrics.coresendingfromqubrics.sendingmailboxfromqubrics.mailboxmanagementfromqubrics.management
Use the per-surface packages directly when an integration only needs one API surface.
Provider model migration
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.
To update provider-list callers:
- Update your requirements to
qubrics-sdkand regenerate your lockfile. If you pin components directly, updatequbrics-core,qubrics-mailbox,qubrics-management, andqubrics-sendingtogether. - Change provider-list annotations and type checks from
management.ProviderItemtomanagement.ProviderListItem. Keepmanagement.ProviderItemfor detail responses, and includevariablesin detail fixtures ({}when none are set). - Run
python -m pip checkand your provider-list, provider-detail, and sending tests. Confirm list items useProviderListItem, detail fixtures retain their variables, and delivery-group requests serialize the selected group.
To roll back, restore the previous SDK and component requirements, lockfile, and affected call sites together.
Thread message model migration
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.
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.
Support
Open an issue in qubrics/qubrics-sdk with the package name, version, and request ID from any API error.
Licence
MIT. See the licence file.
Metadata
Release files for qubrics-sdk 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qubrics_sdk-4.0.0.tar.gz | 5.8 kB | Without provenance | Details for qubrics_sdk-4.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qubrics_sdk-4.0.0-py3-none-any.whl | Python 3 | none | any | Details for qubrics_sdk-4.0.0-py3-none-any.whl |
Total release size: 10.1 kB
Release files / qubrics_sdk-4.0.0.tar.gz
| Download URL | qubrics_sdk-4.0.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
296430cedef7e80eae47d629558024c06c2ef1e37454220b33c83fc730c71c6c
|
|
BLAKE2b-256 checksum How to use checksums |
73e1c4034302674e63c65f2d0b4d3703571403e404db1fe00afa76aa1d5cf5d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / qubrics_sdk-4.0.0-py3-none-any.whl
| Download URL | qubrics_sdk-4.0.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d9ce5ffbf83d942b87a819030bbf7071febbb6b709cbee2998ae2a7ca284f3a
|
|
BLAKE2b-256 checksum How to use checksums |
16005b031991f84e49af1c63fb43535121ade0aed69a70e14b4ac048a976529c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Security for qubrics-sdk 4.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.