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.3.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.3.0
File Size Uploaded Provenance Actions
imbrace-1.3.0.tar.gz 109.5 kB With provenance Details for imbrace-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 205.3 kB

Release files / imbrace-1.3.0.tar.gz

Download URL imbrace-1.3.0.tar.gz
Size 109.5 kB
Tags Source
SHA-256 checksum
How to use checksums
65230fe1edfab6cb39d1616be1c0be48de7c60a9751866007462236bb4b5d4ac
BLAKE2b-256 checksum
How to use checksums
442258a56388f0a94b0d2350ca637a19e24ab766e5ea97233938c018b0f3f026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

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

Download URL imbrace-1.3.0-py3-none-any.whl
Size 95.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55ca91fd9dea576a32d83b796a7a522735f49c632dbfc31e693de72dd0f487c8
BLAKE2b-256 checksum
How to use checksums
a674c50a867527aa60a8ce00f87f7cef20b52f75f19138f62aa39cd6cd8366f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 12, 2026.

Transparency log

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for imbrace-1.3.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 Oct 12, 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