Official Python SDK for the Rescue Lung Society ingestion API
Project description
rescue-lung-sdk (Python)
Official Python SDK for the Rescue Lung Society ingestion API.
Install
pip install rescue-lung-sdk
Quick start
from rescue_lung_sdk import RescueLungClient, PatientRecord, Env
client = RescueLungClient(
api_key="paste-your-key-here", # or set RESCUE_LUNG_API_KEY env var
env=Env.PROD,
)
record = PatientRecord(
patient_id="P00012345",
first_name="Jane", last_name="Doe",
dob="1958-04-12", gender="F",
exam_date="2026-03-15", indication="B",
smoking_status="Former", pack_years=32.0,
)
receipt = client.send(record)
print(receipt.exam_id, "inserted:", receipt.is_insert)
Batch upload
batch = client.batch()
batch.add(record1).add(record2) # collect any number of records
job = batch.send() # returns JobReceipt
# Or upload an existing CSV from your EHR export
job = client.send_csv("monthly_exams.csv")
# Poll the job until done
status = client.get_job(job.job_id)
print(status.status, status.success_count, "/", status.row_count)
API key — three ways
- Constructor:
RescueLungClient(api_key="...")(highest priority). - Environment variable:
RESCUE_LUNG_API_KEY=...(recommended for CI/production). - Edit
rescue_lung_sdk/config.pyand paste the key as theAPI_KEYconstant (simplest for non-developer integrations; do not commit to public repos).
Status
Beta. The data model, HTTP plumbing (with retry/Retry-After), BatchBuilder
CSV helpers, and typed errors are implemented and covered by the test suite. The
API contract (openapi.yaml) is the source of truth; pre-1.0, minor versions may
carry breaking changes as the contract evolves.
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
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 rescue_lung_sdk-0.1.0.tar.gz.
File metadata
- Download URL: rescue_lung_sdk-0.1.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dba5a33b6a998f157bcb88d0013f76cbf0d0826c8b6cd92fe02af299f114bc9
|
|
| MD5 |
451a76db445325bc580183f67e60c3dd
|
|
| BLAKE2b-256 |
279fa112210d77a8c10935cba03af330ebd07252af56a2d1304ccb46834fd401
|
File details
Details for the file rescue_lung_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rescue_lung_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6693ed8fadeb27cebc95ec2e31a8a74803e4f5cc28944d86f6274e4a839eda3e
|
|
| MD5 |
52487063ca74f6b85641ab3d087719cd
|
|
| BLAKE2b-256 |
91aa392f02db5456ca6be8e6da96b59ca4de410d9be6fdd61947b9d51ad38be4
|