Skip to main content

Unofficial Python SDK for the Assured Platform API

Project description

Assured Platform API — Unofficial Python SDK

An unofficial, modern, async-first Python SDK wrapping the Assured Platform API. This library provides fully typed Pydantic models, automatic semantic pagination, and robust file handling designed to streamline interactions with Assured's complex backend.

CI CodeQL Advanced GitHub release PyPI version fury.io Docs License

forthebadge made-with-python uv

Open Demo In Colab

Features

  • Async First: Built on httpx to support highly concurrent workflows seamlessly.
  • Type Safety: Thoroughly documented Pydantic v2 classes represent the massive web of API payloads.
  • Auto-Pagination: Helper methods to pull data incrementally or extract directly into pandas.DataFrames.
  • Session Bridge: A custom JWT authentication layer to shim missing capabilities for undocumented storage and encryption endpoints.

Setup & Installation

The package manages dependencies using standard Python environments (uv, hatch, or pip). The primary configuration is driven via environment variables.

Prerequisites

Create a .env file in your root directory based on the .env.example:

ASSURED_BASE_URL=https://demo-backend.withassured.com
ASSURED_API_KEY=your-api-key-here
ASSURED_USER=your-email@example.com
ASSURED_PASS=your-password

[!NOTE] The API Key handles 95% of requests. However, certain undocumented endpoints like file uploading and SSN encryption require explicit user credentials (ASSURED_USER and ASSURED_PASS) to acquire an internal JWT session token. The client handles fetching and caching this JWT automatically.

Quickstart

import asyncio
from assured import AssuredClient

async def run():
    # Automatically loads configuration from your `.env` file using pydantic-settings
    async with AssuredClient() as client:
        
        # 1. Standard API Key usage: List all providers into a DataFrame
        providers_df = await client.providers.list_df()
        print(providers_df[["full_name", "npi", "email"]])

        # 2. Extract provider details
        detail = await client.credentialing.get_request("some-uuid")
        provider_profile_id = detail.provider_id
        
        # 3. Use undocumented JWT bridging: Upload and associate a document seamlessly!
        # The client recognizes this requires a JWT, fetches one leveraging your User credentials, 
        # posts the multipart payload to S3, and links it into the provider profile.
        contract_bytes = b"..."
        document = await client.provider_profile.upload_and_associate_document(
            provider_id=provider_profile_id,
            file_content=contract_bytes,
            filename="contract.pdf",
            document_name="IHCP Rendering Provider Agreement",
            document_type="Individual Provider Agreement",
        )
        
        # 4. Generate short-lived presigned URLs for assets
        secure_link = await client.files.presign_url(document.document_url)
        print(f"Download the document at: {secure_link}")

if __name__ == "__main__":
    asyncio.run(run())

Structure & Architecture

The domains mirror Assured's core logical groupings:

  • client.users: Managing internal roles.
  • client.providers: Listing, fetching context, and inviting user providers.
  • client.provider_profile: Encompasses deep profiles ranging from demographics to DEAs to Gap Histories.
  • client.credentialing: Operations wrapping verification tasks.
  • client.files: Storage abstraction logic.

Known Discrepancies

The Assured API contains numerous behaviors that diverge from documented OpenAPI specs. To see the specific differences this SDK automatically handles under-the-hood (like Encrypted SSNs and S3 Bucket paths), check out the API Divergence Document.

Project details


Download files

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

Source Distribution

assured_py-1.2.0.tar.gz (86.4 kB view details)

Uploaded Source

Built Distribution

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

assured_py-1.2.0-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file assured_py-1.2.0.tar.gz.

File metadata

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

File hashes

Hashes for assured_py-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6af63a7295859c14949f175caa27d1772b5f77482b5c57368bee8ec1613d0413
MD5 b62f097f350f838c2a13d3958b0bef92
BLAKE2b-256 166b2bdc937c4cd0d463bdf7eb5f853f3f977d707a4f2eff6c0daae9dcd64a22

See more details on using hashes here.

Provenance

The following attestation bundles were made for assured_py-1.2.0.tar.gz:

Publisher: release.yml on jhaisley/assured-py

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

File details

Details for the file assured_py-1.2.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for assured_py-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 edefa137d9fbd051a3a3fe042d4eeebd934360ab9b3736bf661919b22e601776
MD5 41c7277f4ecd7b2620b3173075c99cfa
BLAKE2b-256 1b41691803f32b4a5faf2eea564ad29b308441d0cc965210ecffd16fb2fd2ee9

See more details on using hashes here.

Provenance

The following attestation bundles were made for assured_py-1.2.0-py3-none-any.whl:

Publisher: release.yml on jhaisley/assured-py

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page