Skip to main content

Python client for ThakaaMed's imaging AI service

Project description

BridgeIQ Client

PyPI - Python Version PyPI License

A Python client library for ThakaaMed's Bridge IQ imaging AI analysis service. This library provides a seamless interface to ThakaaMed's radiography analysis API.

About ThakaaMed

ThakaaMed is a pioneering Saudi Arabian healthcare technology company founded in February 2023, dedicated to transforming healthcare through artificial intelligence. As Saudi Arabia's first homegrown medical AI company, ThakaaMed focuses on developing comprehensive artificial intelligence solutions for the healthcare sector, with primary emphasis on medical imaging diagnostics.

Installation

pip install bridge-iq-client

Quick Start

from bridge_iq import BridgeIQClient
from pathlib import Path

# Initialize client with your credentials
client = BridgeIQClient(
    client_id="your_client_id",
    client_secret="your_client_secret",
    device_path="your_device_path"
)

# Send an image for analysis
image_path = Path("path/to/radiograph.dcm")
analysis = client.send_analysis(
    image_path=image_path,
    patient_id="P12345",  # Optional
    patient_name="John Doe",  # Optional
    radiography_type="panoramic_adult"  # Optional, will be auto-detected if not provided
)

# Get the request ID for future reference
request_id = analysis.request_id
print(f"Analysis submitted with request ID: {request_id}")

# Check the status of an analysis
status = client.check_status(request_id)
print(f"Analysis status: {status.analysis_status}")

# If completed, download the PDF report
if status.is_completed and status.report_pdf_link:
    pdf_path = Path("./patient_report.pdf")
    client.download_report(status.report_pdf_link, pdf_path)
    print(f"Report downloaded to {pdf_path}")

Features

  • Simple, Pythonic API for radiography analysis
  • Automatic handling of authentication
  • Progress tracking for analysis requests
  • PDF report download
  • Comprehensive error handling
  • Detailed logging
  • Cross-platform compatibility

Supported Radiography Types

  • panoramic_adult - Panoramic radiograph for adults
  • panoramic_kid - Panoramic radiograph for children
  • bitewing - Bitewing radiograph
  • periapical - Periapical radiograph
  • cbct - Coming soon
  • ceph - Coming soon

Advanced Usage

Custom Environment Configuration

from bridge_iq import BridgeIQClient, Environment

# For development or testing
client = BridgeIQClient(
    client_id="your_client_id",
    client_secret="your_client_secret",
    device_path="your_device_path",
    environment=Environment.DEVELOPMENT
)

Asynchronous Analysis

import asyncio
from bridge_iq import AsyncBridgeIQClient

async def analyze_image():
    client = AsyncBridgeIQClient(
        client_id="your_client_id",
        client_secret="your_client_secret",
        device_path="your_device_path"
    )
    
    # Send image for analysis
    analysis = await client.send_analysis(
        image_path="path/to/radiograph.dcm",
        patient_id="P12345"
    )
    
    # Poll for results
    status = await client.wait_for_completion(
        analysis.request_id,
        timeout=300  # 5 minutes
    )
    
    # Download report if completed
    if status.is_completed and status.report_pdf_link:
        await client.download_report(
            status.report_pdf_link,
            "patient_report.pdf"
        )

# Run the async function
asyncio.run(analyze_image())

Custom Logging

import logging
from bridge_iq import BridgeIQClient

# Configure logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger("bridge_iq")
logger.setLevel(logging.DEBUG)

# Pass logger to client
client = BridgeIQClient(
    client_id="your_client_id",
    client_secret="your_client_secret",
    device_path="your_device_path",
    logger=logger
)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please contact support@thakaamed.com or visit our website.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bridge_iq_client-1.0.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bridge_iq_client-1.0.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file bridge_iq_client-1.0.0.tar.gz.

File metadata

  • Download URL: bridge_iq_client-1.0.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for bridge_iq_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8ba43ec2f84efddf2dc2d2627bd4785a710497c0bc3ce9e4893d44be804cee6c
MD5 e44e92acb49a74a61e32fb3d7ad4a952
BLAKE2b-256 77cbab1a511b99e10cfb1244aa5eee1cd6e6233f87ce2b9d538a67dcfef95318

See more details on using hashes here.

File details

Details for the file bridge_iq_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bridge_iq_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28098e14cd37d58e9bce97f8efd7b16b7f5b7cfe8b34f05831c2a802839bc9a8
MD5 015c3ba4063c5dc2ee5b5e5542d9965d
BLAKE2b-256 91abe2c1f87092f31585962d28af0a943205f362f923a0caec2fb16289d34473

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page