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 contact@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.1.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.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bridge_iq_client-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 810e8338fdb6e4e42a6cefa62d7d654ea27ce733aaa358b2daf1c60f6e6463ef
MD5 b94ccc835f9d1cd9d806e891911137a9
BLAKE2b-256 3d1a8ab6c9de06452eb0722eaa3b768b9de1cf468176e060ad9f463e5744277e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bridge_iq_client-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91ecefc0509527bdd923a80e06e153998b4aa9f8ef9f5ddb090d480c8531adb6
MD5 192eacf5db6dd7bf23f3d00be548e622
BLAKE2b-256 e2e1ad4d895aa77bf7008b330c995706d1d05d226099d49e34e98f82ad4611ee

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