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.
Metadata
Release files for rescue-lung-sdk 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rescue_lung_sdk-0.2.0.tar.gz | 15.4 kB | Without provenance | Details for rescue_lung_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rescue_lung_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for rescue_lung_sdk-0.2.0-py3-none-any.whl |
Total release size: 25.8 kB
Release files / rescue_lung_sdk-0.2.0.tar.gz
| Download URL | rescue_lung_sdk-0.2.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d0ac82ffad20a24a3ad1bf0b26990552c6b77290788481225f76efeef1ef7d2
|
|
BLAKE2b-256 checksum How to use checksums |
43a2895247c13f334f8d69e4e2b6c59fc0e86231f9e00eb7c212d511dda4efaa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / rescue_lung_sdk-0.2.0-py3-none-any.whl
| Download URL | rescue_lung_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50e286e7aafb188122f04343f9303977784de8f3177c088aff372505d5c7c272
|
|
BLAKE2b-256 checksum How to use checksums |
bec99ca60570e17944d33559001b99f4eddc7d92f9a6de6dfeba3a7bb9e8974f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for rescue-lung-sdk 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.