Skip to main content

HealthCloud SDK for Python

Typed Python SDK for HealthCloud services and the HealthCloud Connectors gateway.

Installation

pip install healthcloud-sdk

For local development:

pip install -e ./packages/pip

Python 3.9 or newer is required.

Create and authenticate a client

The current API uses typed request objects. Authentication returns typed response objects; after registration or login, explicitly share the access token with the whole SDK by calling set_access_token.

from healthcloud import HCSDK, LoginRequest, RegisterPatientRequest

sdk = HCSDK(environment="dev", tenant_id="your-tenant-id")

registration = sdk.auth.register(RegisterPatientRequest(
    first_name="Jane",
    last_name="Doe",
    email="patient@example.com",
    password="SecurePassword123!",
    date_of_birth="1990-06-15",
    sex_at_birth="female",
))

token = registration.access_token
if not token:
    login = sdk.auth.login(LoginRequest(
        email="patient@example.com",
        password="SecurePassword123!",
    ))
    token = login.access_token

sdk.set_access_token(token)

In UAT and production, complete email verification before login when the register response reports that verification is required.

from healthcloud import VerifyOtpRequest

sdk.auth.verify_email(VerifyOtpRequest(
    user_id=registration.cognito_sub,
    otp="123456",
))

Service clients

One HCSDK instance exposes these clients:

sdk.auth
sdk.patient
sdk.vitals
sdk.diagnostics
sdk.assistant
sdk.communications
sdk.fieldagent
sdk.mcp
sdk.connectivity
sdk.graph

# Service clients whose public SDK surface is currently connect-only:
sdk.appointments
sdk.ehr
sdk.provider
sdk.rppg
sdk.session
sdk.telehealth

Graph API

sdk.graph exposes 19 public methods, one for each Graph API route. The eight Search/Cypher methods use the rag field already present on their request models. Setting rag=True calls the same POST endpoint and returns a typed GraphRagResponse; there are no separate rag_* wrapper methods.

from healthcloud import CypherQueryRequest, ProviderSearchRequest

# Standard structured response
providers = sdk.graph.search_providers(ProviderSearchRequest(
    phrase="cardiology",
    state_code="CA",
    limit=20,
))

# Same endpoint, Graph-RAG response
provider_answer = sdk.graph.search_providers(ProviderSearchRequest(
    phrase="cardiology",
    state_code="CA",
    limit=20,
    rag=True,
))

concept_answer = sdk.graph.search_medical_concepts_cypher(CypherQueryRequest(
    query="How many medical concepts are available?",
    limit=20,
    rag=True,
))

Search/Cypher methods:

  • search_providers, search_providers_cypher
  • search_health_plans, search_health_plans_cypher
  • search_document_summaries, search_document_summaries_cypher
  • search_medical_concepts, search_medical_concepts_cypher

Additional GET-backed methods:

  • search_medical_concepts_faceted, list_medical_concept_vocabularies
  • list_medical_concepts, get_medical_concept
  • list_medical_concept_relationships, list_medical_concept_ancestors, list_medical_concept_descendants
  • list_policy_documents, search_policy_documents, get_policy_document

Together with connect, this is 19 public SDK methods. The live suite executes 29 scenarios because it tests all eight POST methods both with and without RAG, and runs faceted medical-concept search for SNOMED, RXNORM, and MESH.

All typed methods accept the request model shown in their signature and return a typed response model. Examples:

from healthcloud import SubmitVitalsRequest, UpdatePhoneRequest

patient = sdk.patient.get_patient("patient-id")

phone = sdk.patient.set_phone(
    "patient-id",
    UpdatePhoneRequest(phone="+15550001234"),
)

vitals = sdk.vitals.submit(
    "patient-id",
    SubmitVitalsRequest(
        heart_rate=72,
        systolic=120,
        diastolic=80,
    ),
)

history = sdk.vitals.get_vitals("patient-id")
tools = sdk.mcp.list_tools("patient")

Use sdk.set_access_token(new_token) whenever a token changes. This updates every authenticated service client and every connector client on the SDK instance.

Connectors

Connector methods are called through sdk.connectors; they are not raw HTTP helpers. The package contains 33 connector clients.

Architecture

Connector clients are created in three explicit steps:

  1. Configure HealthCloud once through HCSDK (environment, tenant, access token).
  2. Create an isolated connector client with that connector's vendor credentials via sdk.connectors.<name>.create_client(...).
  3. Call typed operation methods with operation-specific parameters only.

The connector gateway URL is resolved internally from the HealthCloud environment; applications never pass connector base URLs or the HealthCloud bearer token again when creating a connector client. Each client holds its vendor credentials only on that instance and forwards them to the HealthCloud Connectors gateway (POST /connectors/<slug>/<operation>) with every request. Connector-scoped secrets cannot be overridden by operation input, and gateway errors are redacted before being raised.

Create a credential-scoped connector client explicitly. The SDK never reads connector credentials implicitly; applications can load them from their own secret manager or the local .env used by integration tests. Do not hardcode credentials in source code and do not create connector clients in client-side code.

Usage

import os

from healthcloud import HCSDK

sdk = HCSDK(
    environment="dev",
    tenant_id="your-tenant-id",
    access_token="cognito-access-token",
)

athena = sdk.connectors.athena_health.create_client(
    secret_key=os.environ["HC_ATHENA_SECRET_KEY"],
    practice_id=os.environ["HC_ATHENA_PRACTICE_ID"],
    department_id=os.environ["HC_ATHENA_DEPARTMENT_ID"],
    provider_id=os.environ["HC_ATHENA_PROVIDER_ID"],
)
patients = athena.search_patients(
    last_name="Smith",
    limit=5,
)

stripe = sdk.connectors.stripe.create_client(api_key=os.environ["HC_STRIPE_API_KEY"])
stripe_status = stripe.verify_connection()

# Public connector — no vendor credentials required
nppes = sdk.connectors.nppes.create_client()
provider = nppes.verify_provider(npi="1234567890")

# OAuth-style connector
whoop = sdk.connectors.whoop.create_client(
    client_id=os.environ["HC_WHOOP_CLIENT_ID"],
    client_secret=os.environ["HC_WHOOP_CLIENT_SECRET"],
)

Pass mode="live" only when required; mode="sandbox" is the default for mode-aware connectors. Calling sdk.set_access_token(...) propagates the new HealthCloud token to every connector client already created.

Available connectors

The table lists each connector's required credential keyword arguments and the conventional HC_* environment variable names used by the live test suite (names only — never commit values). Parameters marked mode? accept "sandbox" (default) or "live".

Connector Purpose create_client credentials Suggested env vars Called via
anthropic Anthropic (Claude) LLM completions api_key, mode? HC_ANTHROPIC_API_KEY sdk.connectors.anthropic.create_client(...)
apple_auth Sign in with Apple token exchange team_id, client_id, key_id, redirect_uri, private_key HC_APPLE_AUTH_TEAM_ID, HC_APPLE_AUTH_CLIENT_ID, HC_APPLE_AUTH_KEY_ID, HC_APPLE_AUTH_REDIRECT_URI, HC_APPLE_AUTH_PRIVATE_KEY sdk.connectors.apple_auth.create_client(...)
athena_health athenahealth EHR (patients, appointments) secret_key, practice_id, department_id, provider_id, mode? HC_ATHENA_SECRET_KEY, HC_ATHENA_PRACTICE_ID, HC_ATHENA_DEPARTMENT_ID, HC_ATHENA_PROVIDER_ID sdk.connectors.athena_health.create_client(...)
cal Cal.com scheduling and bookings api_key HC_CAL_API_KEY sdk.connectors.cal.create_client(...)
carequality Carequality health information exchange api_key, initiator_url HC_CAREQUALITY_API_KEY, HC_CAREQUALITY_INITIATOR_URL sdk.connectors.carequality.create_client(...)
cms CMS (Centers for Medicare & Medicaid) data api_key HC_CMS_API_KEY sdk.connectors.cms.create_client(...)
connecture ConnectureDRX Medicare plan shopping basic_token, client_key, client_secret HC_CONNECTURE_BASIC_TOKEN, HC_CONNECTURE_CLIENT_KEY, HC_CONNECTURE_CLIENT_SECRET sdk.connectors.connecture.create_client(...)
elevenlabs ElevenLabs text-to-speech api_key HC_ELEVENLABS_API_KEY sdk.connectors.elevenlabs.create_client(...)
fedex FedEx shipping and tracking client_id, client_secret, account_number, mode? HC_FEDEX_CLIENT_ID, HC_FEDEX_CLIENT_SECRET, HC_FEDEX_ACCOUNT_NUMBER sdk.connectors.fedex.create_client(...)
google_ai Google AI (Gemini) LLM api_key HC_GOOGLE_AI_API_KEY sdk.connectors.google_ai.create_client(...)
google_places Google Places search/geocoding api_key, mode? HC_GOOGLE_PLACES_API_KEY sdk.connectors.google_places.create_client(...)
grok xAI Grok LLM api_key HC_GROK_API_KEY sdk.connectors.grok.create_client(...)
healthie Healthie EHR / practice management secret_key, mode?, shard_id? HC_HEALTHIE_SECRET_KEY, HC_HEALTHIE_AUTHORIZATION_SHARD sdk.connectors.healthie.create_client(...)
impilo Impilo remote patient monitoring logistics api_key HC_IMPILO_API_KEY sdk.connectors.impilo.create_client(...)
junction Junction (Vital) lab testing and wearables api_key HC_JUNCTION_API_KEY sdk.connectors.junction.create_client(...)
nppes NPPES NPI registry lookup (public, no credentials) sdk.connectors.nppes.create_client()
openai OpenAI LLM completions api_key HC_OPENAI_API_KEY sdk.connectors.openai.create_client(...)
oura Oura ring wearable data (OAuth) client_id, client_secret, mode? HC_OURA_CLIENT_ID, HC_OURA_CLIENT_SECRET sdk.connectors.oura.create_client(...)
plaid Plaid identity / financial verification client_id, secret, template_id, mode? HC_PLAID_CLIENT_ID, HC_PLAID_SECRET, HC_PLAID_TEMPLATE_ID sdk.connectors.plaid.create_client(...)
quest Quest Diagnostics — REST-style orders/results/catalog and HL7 orders, results, compendium client_id, client_secret, mode? HC_QUEST_CLIENT_ID, HC_QUEST_CLIENT_SECRET sdk.connectors.quest.create_client(...)
salesforce Salesforce CRM records and queries client_id, client_secret, username, password, mode? HC_SALESFORCE_CLIENT_ID, HC_SALESFORCE_CLIENT_SECRET, HC_SALESFORCE_USERNAME, HC_SALESFORCE_PASSWORD sdk.connectors.salesforce.create_client(...)
scrapfly Scrapfly web scraping api_key HC_SCRAPFLY_API_KEY sdk.connectors.scrapfly.create_client(...)
senaite SENAITE LIMS (lab information management) base_url, username, password HC_SENAITE_BASE_URL, HC_SENAITE_USERNAME, HC_SENAITE_PASSWORD sdk.connectors.senaite.create_client(...)
sendgrid SendGrid transactional email api_key, mode? HC_SENDGRID_API_KEY sdk.connectors.sendgrid.create_client(...)
steadymd SteadyMD telehealth clinician network api_key or token (exactly one), mode?, api_url? HC_STEADYMD_API_KEY or HC_STEADYMD_TOKEN, HC_STEADYMD_API_URL sdk.connectors.steadymd.create_client(...)
stedi Stedi insurance eligibility (X12/EDI) api_key HC_STEDI_API_KEY sdk.connectors.stedi.create_client(...)
stripe Stripe payments and subscriptions api_key HC_STRIPE_API_KEY sdk.connectors.stripe.create_client(...)
twilio Twilio SMS / voice messaging account_sid, auth_token, from_number, mode? HC_TWILIO_ACCOUNT_SID, HC_TWILIO_AUTH_TOKEN, HC_TWILIO_FROM_NUMBER sdk.connectors.twilio.create_client(...)
uber Uber Direct / Health rides and deliveries client_id, client_secret, customer_id, mode? HC_UBER_CLIENT_ID, HC_UBER_CLIENT_SECRET, HC_UBER_CUSTOMER_ID sdk.connectors.uber.create_client(...)
whoop WHOOP wearable data (OAuth) client_id, client_secret, mode? HC_WHOOP_CLIENT_ID, HC_WHOOP_CLIENT_SECRET sdk.connectors.whoop.create_client(...)
zocdoc Zocdoc provider search and booking api_key HC_ZOCDOC_API_KEY sdk.connectors.zocdoc.create_client(...)
zus Zus Health aggregated patient data client_id, client_secret, mode? HC_ZUS_CLIENT_ID, HC_ZUS_CLIENT_SECRET sdk.connectors.zus.create_client(...)

Note: the single quest connector covers both the REST-style order/results/catalog operations and the HL7 message-based operations, all routing to the gateway's quest slug with the same credentials.

Errors and cleanup

from healthcloud import HealthCloudHTTPError, HealthCloudNetworkError

try:
    stripe.verify_connection()
except HealthCloudHTTPError as exc:
    print(exc.status_code, str(exc))
except HealthCloudNetworkError as exc:
    print(str(exc))
finally:
    sdk.close()

Verification

From packages/pip:

.\.venv\Scripts\python.exe -m pytest -q -m "not live"

Live integration tests are opt-in and use package methods:

$env:HC_RUN_INTEGRATION="true"
$env:HC_ALLOW_REGISTER="true"
.\.venv\Scripts\python.exe -m pytest -q -m live

Do not commit .env files or connector credentials.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

healthcloud_sdk-0.9.1.tar.gz (28.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

healthcloud_sdk-0.9.1-py3-none-any.whl (220.6 kB view details)

Uploaded Python 3

File details

Details for the file healthcloud_sdk-0.9.1.tar.gz.

File metadata

  • Download URL: healthcloud_sdk-0.9.1.tar.gz
  • Upload date:
  • Size: 28.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for healthcloud_sdk-0.9.1.tar.gz
Algorithm Hash digest
SHA256 8717a5a3bd8ee93408e6b94b27184288c4d7f52c7b3840b3ad7deb25919ec75b
MD5 c50720ba3fd3b6ebb979e55b0b9a4376
BLAKE2b-256 719d81a4a5601d6b01b5f6825369dc42fbd232fcfe6b37ffa48152c5bb70e88d

See more details on using hashes here.

File details

Details for the file healthcloud_sdk-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for healthcloud_sdk-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 441bcf42a3f2e90594b655b152a9237733fac08ba80d08e8b8bd62d38a5c9641
MD5 c8006385f0ae562af159e7159d6012ee
BLAKE2b-256 8aef55112a3de6d5ac61e8caa3f7a526970dd703a68e48b94ff19a54d398b5f7

See more details on using hashes here.

Release history Release notifications | RSS feed

2.17.0

2 files

2.16.0

2 files

2.15.0

2 files

2.13.0

2 files

2.12.0

2 files

2.11.0

2 files

2.10.0

2 files

2.9.0

2 files

2.8.0

2 files

2.7.0

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

2 files

2.5.0

2 files

2.4.1

2 files

2.4.0

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

0.11.0

2 files

0.10.0

2 files

This release

0.9.1 This release

2 files

0.9.0

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.9

2 files

0.8.8

2 files

0.8.7

2 files

0.8.5

2 files

0.8.4

2 files

0.8.2

2 files

0.8.1

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page