Skip to main content

stedi

PyPI Python versions License

The Stedi SDK for Python — unified, typed access to Stedi's APIs from a single client.

Requirements

Installing

pip install stedi
# or: uv add stedi
# or: poetry add stedi

Authentication

You must authenticate every request with a Stedi API key. Set the API key on the Config you use to construct the client. The client is async, so build it inside a running event loop:

import asyncio

from stedi import Config, Stedi


async def main() -> None:
    async with Stedi(Config(api_key="...")) as client:
        ...  # send operations here — see the Quickstart below


asyncio.run(main())

An API key is the only credential the Python client accepts; OAuth access tokens are supported in the TypeScript SDK. Visit the Stedi documentation for how to obtain and manage API keys.

Quickstart

The client is async and acts as a context manager. To send a typed operation, pass its input model:

import asyncio

from stedi import Config, Stedi


async def main() -> None:
    # Submit a complete CMS-1500 claim. See the runnable claims example for a full payload.
    # `load_claim` is your own function — the runnable examples read a JSON fixture.
    claim = load_claim()

    async with Stedi(Config(api_key="...")) as client:
        response = await client.create_professional_claim_submission(claim)

        print(f"claim {response.claim_id}, submission {response.submission_id}")


asyncio.run(main())

Operation input models are under stedi.models.

One client for every Stedi API

A single client routes each operation to the correct Stedi host automatically. This lets you use one client and one set of credentials for the entire SDK.

from stedi import Config, Stedi


async def main() -> None:
    async with Stedi(Config(api_key="...")) as client:
        # `claim` is a CreateProfessionalClaimSubmissionInput, as built in the Quickstart above.
        await client.create_professional_claim_submission(claim)

Available operations

Claims

Method Description
create_professional_claim_submission Submit a professional claim in JSON modeled after the CMS-1500 form structure
get_claim Retrieve summary information for a claim, including current processing status and key details from its most recent submission
get_claim_timeline Retrieve a paginated list of a claim's timeline entries, newest first. Timeline entries include submissions, acknowledgments, and claim payment information
get_professional_claim_submission Retrieve a claim's data and map it to Stedi's CMS-1500 JSON format
list_claims Retrieve a paginated list of claim records, newest first. Filter by status, patient control numbers, or submission time
validate_professional_claim_submission Validate a professional claim in the Stedi JSON format without submitting it

Eligibility Check

Method Description
create_eligibility_check Submit a real-time 270/271 eligibility check in JSON format

Event Destinations

Method Description
create_event_destination Creates an event destination. Returns destination details and a signing secret for verifying event payloads.
delete_event_destination Deletes an existing destination. This action is irreversible. Deleting a destination that is already deleted succeeds with the same response (idempotent).
get_event_destination Retrieves details for an existing event destination.
get_event_destination_event Retrieves the details of an existing event by its identifier.
get_event_destination_secret Retrieves the current signing secret for a destination. Use this secret to verify the authenticity of event payloads.
list_event_destination_events Lists all events for your account. Results are paginated.
list_event_destinations Lists all destinations configured for your account. Results are paginated.
rotate_event_destination_secret Rotates the signing secret for a destination. The previous secret remains valid for the period specified by previousSecretExpiryHours (or 0 for immediate invalidation) to allow for a graceful transition.
update_event_destination Updates an existing destination configuration.

This list grows as Stedi releases more APIs through the SDK.

Configuration

Configure everything through the Config, including the API key:

import asyncio

from stedi import Config, RetryStrategyOptions, Stedi


async def main() -> None:
    config = Config(
        api_key="...",
        # Retry policy — the client defaults to StandardRetryStrategy(max_attempts=3).
        retry_strategy=RetryStrategyOptions(max_attempts=4),
    )

    async with Stedi(config) as client:
        ...


asyncio.run(main())

Error handling

Service errors are raised as CallError. Every error class under stedi.models is a subclass, so catch CallError for any of them, or a specific class for one:

from stedi import CallError, Config, Stedi


async def main() -> None:
    async with Stedi(Config(api_key="...")) as client:
        try:
            await client.create_professional_claim_submission(claim)
        except CallError as exc:
            print(f"{type(exc).__name__}: {exc}")
            raise

Examples

Access runnable, end-to-end examples for every operation in the examples/python/ directory.

Documentation & support

License

Apache-2.0

Metadata

Release files for stedi 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stedi 1.1.0
File Size Uploaded Provenance Actions
stedi-1.1.0.tar.gz 162.8 kB With provenance Details for stedi-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stedi 1.1.0
File Interpreter ABI Platform Actions
stedi-1.1.0-py3-none-any.whl Python 3 none any Details for stedi-1.1.0-py3-none-any.whl

Total release size: 330.6 kB

Release files / stedi-1.1.0.tar.gz

Download URL stedi-1.1.0.tar.gz
Size 162.8 kB
Tags Source
SHA-256 checksum
How to use checksums
825f6c627c1e6da4acbe277fe951c51cada7c51f380b08edcb7f606a48435b28
BLAKE2b-256 checksum
How to use checksums
b6e22ad099e26661cb6c85164a7b272f2c485dad69f660937b03ede3e806f259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / stedi-1.1.0-py3-none-any.whl

Download URL stedi-1.1.0-py3-none-any.whl
Size 167.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56b43506412cbc9546627a646260e548ced5297fe59572b2f5b60504cfeb7abd
BLAKE2b-256 checksum
How to use checksums
04c995ba668a1f5b149b210104d025028d5bbf75c66fd4e5b2abfa71d7549b1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for stedi 1.1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stedi-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files Full provenance

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