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.7.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.7.0
File Size Uploaded Provenance Actions
imbrace-1.7.0.tar.gz 124.9 kB With provenance Details for imbrace-1.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 233.0 kB

Release files / imbrace-1.7.0.tar.gz

Download URL imbrace-1.7.0.tar.gz
Size 124.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e1e20f9aa5097e116e710d8b02965d82c874b1c4e2f49942d6715221de1c7a7e
BLAKE2b-256 checksum
How to use checksums
41f8383fd9c837eee1a12039935d0c700570036c7ad77484be4ddf784144bbf6
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 11, 2026.

Transparency log

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

Download URL imbrace-1.7.0-py3-none-any.whl
Size 108.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e58ad6633b171892b923ac2c25f8234fb3dbb3cab634911291d749bdeeb3967
BLAKE2b-256 checksum
How to use checksums
b68752a784d2c0fe4ed7cfef454edaec4d14ca16d726f35b33fc9dfb414db4b0
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 11, 2026.

Transparency log

Security for imbrace 1.7.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.7.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 11, 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