Skip to main content

iMBrace Python SDK

Official Python client for the iMBrace Gateway. Supports sync and async.

Installation

pip install imbrace

Quick Start

API Key — server-side scripts, Celery tasks

from imbrace import ImbraceClient

client = ImbraceClient(api_key="sk-xxx...")

me = client.platform.get_me()

Access Token — after user login

client = ImbraceClient(access_token="acc_xxxxxxxxxxxxx")

OTP Login Flow

client = ImbraceClient()

client.request_otp("user@example.com")
client.login_with_otp("user@example.com", "123456")

# all subsequent calls are authenticated
me = client.platform.get_me()

Async Client

from imbrace import AsyncImbraceClient

async with AsyncImbraceClient(api_key="sk-xxx...") as client:
    me = await client.platform.get_me()

Error Handling

from imbrace import AuthError, ApiError, NetworkError

try:
    client.platform.get_me()
except AuthError:
    print("Invalid credentials")
except ApiError as e:
    print(f"[{e.status_code}] {e}")
except NetworkError:
    print("Gateway unreachable")

Environment Variables

Variable Description
IMBRACE_API_KEY API key (server-side auth)
IMBRACE_GATEWAY_URL Override gateway URL (default: https://app-gatewayv2.imbrace.co)
IMBRACE_ENV Environment preset: develop, sandbox, stable (default: stable)

Development

pip install -e ".[dev]"
pytest                    # unit tests
pytest tests/integration  # integration tests (requires IMBRACE_API_KEY)

Resources

Full resource reference: sdk.imbrace.co/python/resources

Metadata

Release files for imbrace 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imbrace 1.5.0
File Size Uploaded Provenance Actions
imbrace-1.5.0.tar.gz 115.4 kB With provenance Details for imbrace-1.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imbrace 1.5.0
File Interpreter ABI Platform Actions
imbrace-1.5.0-py3-none-any.whl Python 3 none any Details for imbrace-1.5.0-py3-none-any.whl

Total release size: 215.8 kB

Release files / imbrace-1.5.0.tar.gz

Download URL imbrace-1.5.0.tar.gz
Size 115.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2d76e7eaad6725d7878e92616ab3313b6289cc99500c53b41bb12bd341d7a0cb
BLAKE2b-256 checksum
How to use checksums
43d183228d0a922f91240127251d26b109f837d28c32ae9e4a8adb8d1eeeba50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Release files / imbrace-1.5.0-py3-none-any.whl

Download URL imbrace-1.5.0-py3-none-any.whl
Size 100.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfee105aed6a8206e9b9a5f41a395e7e1da727687d04c07260ce4141a851e2d6
BLAKE2b-256 checksum
How to use checksums
ec0386e18e67aa6bbb6883ca67d15293370623294a50a09e606ae6cab0c834bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

Security for imbrace 1.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for imbrace-1.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page