Skip to main content

Open Dental Python SDK

A comprehensive Python SDK for the Open Dental API, providing 100% endpoint coverage, type safety, and easy integration with your Python applications.

Installation

Install the SDK using your preferred Python package manager:

pip

pip install opendental-sdk

rye

rye add opendental-sdk

uv

uv pip install opendental-sdk

Quick Start

from opendental import OpenDentalClient

# Initialize the client with your API keys
client = OpenDentalClient(
    developer_key="your_developer_key_here",
    customer_key="your_customer_key_here"
)

# Or use environment variables
# export OPENDENTAL_DEVELOPER_KEY=your_developer_key_here
# export OPENDENTAL_CUSTOMER_KEY=your_customer_key_here
client = OpenDentalClient()

# Get all patients
patients = client.patients.get()

# Get a specific patient
patient = client.patients.get(patient_id=123)

# Create a new patient
new_patient = client.patients.create({
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com"
})

# Update a patient
updated_patient = client.patients.update(123, {
    "email": "newemail@example.com"
})

# Delete a patient
client.patients.delete(123)

Authentication

The Open Dental API requires both a Developer API Key and a Customer API Key. You can obtain these from the Open Dental Developer Portal.

Set your keys in one of the following ways:

  1. Environment Variables (Recommended):
export OPENDENTAL_DEVELOPER_KEY=your_developer_key
export OPENDENTAL_CUSTOMER_KEY=your_customer_key
  1. Direct Initialization:
client = OpenDentalClient(
    developer_key="your_developer_key",
    customer_key="your_customer_key"
)

Error Handling

The SDK provides comprehensive error handling:

from opendental import OpenDentalClient, OpenDentalAPIError

try:
    client = OpenDentalClient()
    patients = client.patients.get()
except OpenDentalAPIError as e:
    print(f"API Error: {e}")
except Exception as e:
    print(f"Unexpected error: {e}")

Available Resources

The SDK provides access to all Open Dental API resources:

  • Patients: client.patients
  • Appointments: client.appointments
  • Procedures: client.procedures
  • Insurance: client.insurance
  • Billing: client.billing
  • And many more...

Configuration

You can customize the client behavior:

client = OpenDentalClient(
    developer_key="your_key",
    customer_key="your_key",
    base_url="https://api.opendental.com",  # Custom API base URL
    timeout=30  # Request timeout in seconds
)

Type Safety

The SDK includes full type annotations and supports modern Python type checking:

from opendental import OpenDentalClient
from opendental.models import Patient

client: OpenDentalClient = OpenDentalClient()
patient: Patient = client.patients.get(123)

Development

To set up the development environment:

git clone https://github.com/opendental/python-sdk
cd python-sdk/python
pip install -e ".[dev]"

Running Tests

pytest

Code Formatting

black src/
isort src/

Type Checking

mypy src/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions:

HIPAA Compliance

⚠️ Important: This SDK handles sensitive patient data. Ensure you have a Business Associate Agreement (BAA) in place with Open Dental and follow all HIPAA compliance requirements when using this SDK in production.

Using uv for Dependency Management

We recommend using uv for fast dependency management and environment setup.

Install uv

You can install uv with pipx:

pipx install uv

Or with Homebrew (on macOS):

brew install astral-sh/uv/uv

Create a Virtual Environment and Install Dependencies

uv venv .venv
source .venv/bin/activate
uv pip install -r requirements.txt

Or install directly from pyproject.toml:

uv pip install -r <(uv pip compile pyproject.toml)

Running Tests

uv pip install -r requirements.txt --extra dev
pytest

For more, see the uv documentation.

Metadata

Release files for opendental-sdk 2.2.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 opendental-sdk 2.2.0
File Size Uploaded Provenance Actions
opendental_sdk-2.2.0.tar.gz 140.3 kB Without provenance Details for opendental_sdk-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opendental-sdk 2.2.0
File Interpreter ABI Platform Actions
opendental_sdk-2.2.0-py3-none-any.whl Python 3 none any Details for opendental_sdk-2.2.0-py3-none-any.whl

Total release size: 350.0 kB

Release files / opendental_sdk-2.2.0.tar.gz

Download URL opendental_sdk-2.2.0.tar.gz
Size 140.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e6cd6e2d0583eca91b54e7af3808e68154cbe41edf7bb91d843f718ed7065a23
BLAKE2b-256 checksum
How to use checksums
2b8c534ea56f4f2a811f14dd532bed057a2f0ea7fa2fc642a0acfaad9368b475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / opendental_sdk-2.2.0-py3-none-any.whl

Download URL opendental_sdk-2.2.0-py3-none-any.whl
Size 209.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30faa2a3aaa23aaf2300dc323488232e122fdf175ab398e3d370d65e23fc472a
BLAKE2b-256 checksum
How to use checksums
cfa7f800e3b751c6a66f0bc248c9fd51e1b0c80754c6d7a5ba4d9ab7c4e684c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for opendental-sdk 2.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

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