Skip to navigation

Bridge provides a Python client for interacting with the Bridge API. This SDK simplifies API integration by providing type-safe methods, automatic authentication handling, and built-in error handling.

Features

  • Type Safety: Full Python type hints with generated types from our API specification
  • Authentication: Automatic token management and refresh handling
  • Error Handling: Comprehensive error handling with detailed error messages
  • Request/Response Validation: Built-in validation for all API requests and responses
  • Modern Python: Async/await support with Pydantic models

Installation

Install the SDK from PyPI:

pip install usebridge-api

Quick Start

from usebridge_api import BridgeApiClient, BridgeApiEnvironment
# Initialize the client
client = BridgeApiClient(
api_key="your-api-key",
environment=BridgeApiEnvironment.PRODUCTION, # or BridgeApiEnvironment.SANDBOX (defaults to PRODUCTION if not specified)
)
# Create a Patient
patient = client.patients.v2.create_patient(
first_name="Jane",
last_name="Smith",
email="patient@example.com",
date_of_birth="2000-01-01",
)

Resources