Python SDK Released

Official Python SDK for the QOPE API with type hints, async support, and pandas integration.

Our official Python SDK is now available on PyPI.

Installation

pip install qope

Quick Start

from qope import QopeClient

client = QopeClient(api_key="your_api_key")

# Search trials
trials = client.trials.search(
    condition="lung cancer",
    phase=3,
    status="recruiting"
)

# Get a specific drug
drug = client.drugs.get("NDC-12345-678-90")

# List investigators at a site
investigators = client.sites.get("SITE-12345").investigators

Pandas Integration

Convert any result set directly to a DataFrame:

df = client.trials.search(sponsor="Pfizer").to_dataframe()

Async Support

For high-throughput applications:

import asyncio
from qope import AsyncQopeClient

async def fetch_trials():
    async with AsyncQopeClient(api_key="...") as client:
        trials = await client.trials.search(phase=3)
        return trials

asyncio.run(fetch_trials())

Type Hints

Full type annotations for IDE autocomplete and static analysis. Works great with mypy and pyright.

Documentation

See the Python SDK documentation for complete reference and examples.

TypeScript SDK coming next month.