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.2.2

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.2.2
File Size Uploaded Provenance Actions
imbrace-1.2.2.tar.gz 98.5 kB With provenance Details for imbrace-1.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 184.8 kB

Release files / imbrace-1.2.2.tar.gz

Download URL imbrace-1.2.2.tar.gz
Size 98.5 kB
Tags Source
SHA-256 checksum
How to use checksums
935fdb5773798bd6b414c2e9d44e324eff04876a888b206218dcf80a72a9fb37
BLAKE2b-256 checksum
How to use checksums
935479266a1b73eb10597aca0a4e329a59ca34d99da89ede24349c73923583cf
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 5, 2026.

Transparency log

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

Download URL imbrace-1.2.2-py3-none-any.whl
Size 86.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da1196351b9ddadc90840294e3bd21659a4165e42416c7b6b924212a50041ee8
BLAKE2b-256 checksum
How to use checksums
7d7bcb4b19755d92034b14d89d042de0f9dac78b23f2ba73fcaaea40f13899c5
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 5, 2026.

Transparency log

Security for imbrace 1.2.2

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.2.2.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 5, 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