Official Python SDK for the CXR SaaS API - Claim Reasoning Engine
Project description
CXR SDK
Official Python SDK for the CXR SaaS API - Claim Reasoning Engine.
Installation
pip install cxr-sdk
Quick Start
import asyncio
from cxr_sdk import CXRClient, CXRClientConfig
async def main():
config = CXRClientConfig(
base_url="https://api.cxr.cloud/v1",
client_id="your-client-id",
client_secret="your-client-secret",
)
async with CXRClient(config) as client:
# Submit a claim
submission = await client.submit_claim({
"claimId": "CLM-001",
"lines": [
{"procedureCode": "99213", "billedAmount": 120.0, "paidAmount": 80.0}
]
})
# Wait for results
result = await client.submit_and_wait(submission.jobId)
print(f"Verdict: {result.verdict}")
asyncio.run(main())
Features
- Automatic Token Renewal: Tokens are automatically refreshed before expiry
- Bulk Operations: Submit and process multiple claims concurrently
- Error Handling: Comprehensive error handling with retry patterns
- Type Safety: Full type hints and Pydantic models
- Async/Await: Built on async/await for high performance
Examples
See the examples/ directory for:
basic_quickstart.py- Basic claim submission workflowbulk_submission.py- Bulk claim processingerror_handling.py- Error handling patternsbenchmark_analysis.py- Benchmark metrics analysissdk_demo.ipynb- Interactive Jupyter notebook
API Reference
CXRClient
Main client class for interacting with the CXR API.
Methods
submit_claim(claim_payload, *, idempotency_key=None)- Submit a single claimsubmit_claims_bulk(claims, *, max_concurrent=10)- Submit multiple claims concurrentlyget_claim(job_id)- Get job statusget_results(job_id)- Get claim resultssubmit_and_wait(job_id, *, interval=1.0, timeout=60.0)- Submit and wait for resultssubmit_and_wait_bulk(job_ids, *, interval=1.0, timeout=60.0, max_concurrent=10)- Wait for multiple jobsget_benchmarks()- Get current benchmark metricsget_benchmark_history(*, limit=None)- Get benchmark history
Requirements
- Python >= 3.10
- httpx >= 0.28
- pydantic >= 2.5
License
Proprietary - CXR Labs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cxr_sdk-0.1.0.tar.gz
(9.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cxr_sdk-0.1.0.tar.gz.
File metadata
- Download URL: cxr_sdk-0.1.0.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58d1398973aa15fc3d5115e273207849127100c1630255d7f734998cebe595b6
|
|
| MD5 |
83a7e53d94925951638e9cb6b19e9ee4
|
|
| BLAKE2b-256 |
684055b24c80ff577b8c3a952be26bfc213922b0554df6fe728e00b4ffd26cc5
|
File details
Details for the file cxr_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cxr_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ae03bc4c3a090fceadb65b1b3bc4573fd772e63a26009ef42f97723209d82b3
|
|
| MD5 |
3171fa6c1d5db57f23d96f26bdf9005e
|
|
| BLAKE2b-256 |
fcc9b0ddd804c22d969c2f45c5b401196d59e9d7b4951cc149ad35526c14f3ba
|