Skip to main content

IntaOps Connector — Python

Drop-in Python SDK for the IntaOps SMART-on-FHIR R4 network.

pip install intaops

Prerequisites

Before the SDK can call IntaOps, you need OAuth credentials — client_id + client_secret. Get them from the IntaOps Dashboard:

  1. Sign in → Developer Portal → Applications (https://intaops.io/applications)
  2. Create an Application — pick client_credentials for backend services, or authorization_code for provider / patient-facing apps
  3. Copy the client_secret when shown — it's revealed once. Keep it server-side, never in browser code.

The SDK handles the OAuth token exchange (POST /oauth/token) for you — IntaOpsClient(client_id=…, client_secret=…) is enough. Access tokens are short-lived (~5 min) and refreshed automatically.

Backend (system-to-system)

from intaops import IntaOpsClient

client = IntaOpsClient(
    client_id="app_live_…",
    client_secret="secret_live_…",
    environment="live",                  # or "sandbox"
    scopes=["system/Patient.read", "system/Observation.read"],
)
patient = client.fhir.get("Patient", "u123")
for obs in client.fhir.search_iter("Observation", patient="u123"):
    print(obs["valueQuantity"]["value"])

Provider / patient app (SMART user grant)

from intaops import IntaOpsClient

# Step 1 — generate PKCE + redirect the user
pkce = IntaOpsClient.generate_pkce()
client = IntaOpsClient(
    client_id="app_live_…", environment="live",
    scopes=["patient/Observation.read", "patient/MedicationRequest.read"],
)
url = client.authorize_url(
    redirect_uri="https://yourapp.com/cb",
    code_challenge=pkce.challenge,
)
# … redirect the user to `url`, capture `code` on the callback …

# Step 2 — exchange the code for tokens
client = IntaOpsClient.from_authorization_code(
    code=code_from_callback,
    redirect_uri="https://yourapp.com/cb",
    code_verifier=pkce.verifier,
    client_id="app_live_…",
    environment="live",
    scopes=["patient/Observation.read", "patient/MedicationRequest.read"],
)
obs = client.fhir.get("Observation", "obs-1")

Errors

from intaops import (
    IntaOpsError, OAuthError, OperationOutcomeError,
    ConsentRequiredError, RateLimitedError,
)

try:
    client.fhir.get("Observation", "obs-1")
except ConsentRequiredError as e:
    # First call to any patient/* scope ALWAYS returns this — consent is OFF
    # by default. The IntaOps backend auto-pushes a prompt to the individual's
    # IntaOps app; surface e.consent_url to them (push, email, in-app deep-link)
    # and retry once they approve.
    notify_user(e.user_id, e.consent_url)
except RateLimitedError as e:
    time.sleep(e.retry_after or 30)
except OperationOutcomeError as e:
    log(e.status_code, e.issue_code, e.location, e.outcome)
except OAuthError as e:
    refresh_credentials(e.error)

Scope ↔ industry gating — the scopes your app can request are bounded by your entity's industry. Healthcare entities can request patient/* (consent-gated) and system/* (broad read) FHIR scopes; other industries are scoped to their own data surfaces (financial → financial data, retail → shopping, etc.). Requesting a scope outside your industry raises OAuthError("invalid_scope") at client instantiation.

API

  • IntaOpsClient(client_id, client_secret=, environment=, scopes=)
  • IntaOpsClient.from_authorization_code(code, redirect_uri, code_verifier, …)
  • IntaOpsClient.generate_pkce()PKCEPair
  • IntaOpsClient.authorize_url(redirect_uri, code_challenge, state=) → str
  • client.fhir.get(resource_type, resource_id) → dict
  • client.fhir.search(resource_type, **params) → Bundle dict
  • client.fhir.search_iter(resource_type, **params) → iterator of resources
  • client.fhir.create(resource_type, resource) → dict
  • client.fhir.update(resource_type, resource_id, resource) → dict
  • client.fhir.capability_statement() → dict

Marketplace & interoperability — client.marketplace

Also importable standalone: from intaops.marketplace import MarketplaceClient.

  • client.marketplace.products.create(**data) · .create_with_transform(**data) · .update(product_id, **data) · .get(product_id) · .search(**params)
  • client.marketplace.products.bulk_import(products) · .csv_upload(file, filename="products.csv")
  • client.marketplace.payments.initiate(**data) · .process(transaction_id) · .history(**params) · .revenue()
  • client.marketplace.channels.create(**data) · .send(channel_id, **data)
  • client.marketplace.webhooks.subscribe(**data) · .list() · .update(subscription_id, **data) · .delete(subscription_id) · .deliveries(subscription_id) · .test(subscription_id)
  • client.marketplace.transform.create_schema_mapping(**data)
  • MarketplaceClient.verify_signature(payload, signature, secret) → bool — verify the Intaops-Signature header on inbound webhooks

Migration (EHR / EMR import) — client.migration

Also importable standalone: from intaops.migration import MigrationClient.

  • client.migration.initiate(...) → job dict
  • client.migration.status(job_id) · .jobs(limit=50)
  • client.migration.push_records(job_id, records)
  • client.migration.fhir_import(**kwargs) · .fhir_import_status(job_id)

License

Apache-2.0.

Download files

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

Source Distribution

intaops-0.1.2.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

intaops-0.1.2-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file intaops-0.1.2.tar.gz.

File metadata

  • Download URL: intaops-0.1.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for intaops-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5b237754f08c0d79da3da28d1e9b2a697d586364931cf709a7759a4d1099d1bb
MD5 9f28129090e3650c1b7989473bed1000
BLAKE2b-256 a7765f66a06a54232e22f8410d1f9e7acd05fd9998b7c4ece5a178e076c10e4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for intaops-0.1.2.tar.gz:

Publisher: connector-python.yml on IntaOps/IntaOps-SDKs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file intaops-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: intaops-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for intaops-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4737c24efdc42563fef6d15cce599acd934da1cfb6acef5f2f5fb570c9e0e740
MD5 ce08e837cf24af565032866ecd519872
BLAKE2b-256 c811b15c2fee8ec7ab127c4fb04445d06cac0a629fb74bc9d329ef24b4d197dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for intaops-0.1.2-py3-none-any.whl:

Publisher: connector-python.yml on IntaOps/IntaOps-SDKs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.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