Python SDK

Python SDK

A Python SDK to easily interact with the Oh Dear API from your Python applications.

The Python SDK provides a convenient way to interact with the Oh Dear API from Python applications. Built and maintained by Owen Voke, it offers full access to Oh Dear's monitoring capabilities.

Installation #

pip install ohdear-sdk

Features #

The SDK supports all major Oh Dear API operations:

Usage #

from ohdear import OhDear

ohdear = OhDear(api_token="your-api-token")

# Get all sites
sites = ohdear.sites.all()

# Get a specific site
site = ohdear.sites.show(site_id)

# Get broken links
broken_links = ohdear.broken_links.show(site_id)

# Get certificate health
cert = ohdear.certificate_health.show(site_id)

Testing #

The SDK uses hatch for testing:

hatch shell
hatch run test

For more details, see the GitHub repository.