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.5.tar.gz (20.4 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.5-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: intaops-0.1.5.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for intaops-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d806f8043f527032676a60445971ab14be8718c17381452f00930f1523e9eaa8
MD5 a154ad31dde39aa9e97635258c2923ab
BLAKE2b-256 c675b8557f1cfc81836469c68abf25a68ed6043cd47d0c6442e379b54efeb8e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for intaops-0.1.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: intaops-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for intaops-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7336d9ecd900cfee4da8d3494c0f46508be642f56c4e35fa97cd418458b98dba
MD5 b50a550b3e9ded739a2c11d01cff2e06
BLAKE2b-256 a05b125362a5fb4ad29c004bb36ab24a18884ee38b27bf357d29bd0032eb279f

See more details on using hashes here.

Provenance

The following attestation bundles were made for intaops-0.1.5-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

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

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