?️ Iris Python Client

Tests Coverage PyPI

Minimal Python client for the Iris API, built on top of Authlib and httpx.


pip install dioptra-iris-client


from iris_client import IrisClient, AsyncIrisClient

# NOTE: If the username and/or the password are not specified,
# they will be retrieved from the `IRIS_USERNAME` and `IRIS_PASSWORD` environment variables.

# Synchronous client
with IrisClient("[email protected]", "password") as client:
    measurements = client.get("/measurements/").json()

# Asynchronous client
async with AsyncIrisClient("[email protected]", "password") as client:
    measurements = (await client.get("/measurements/")).json()

# Helper function to fetch all the results from a paginated endpoint,
# available for both clients:
all_measurements = client.all("/measurements/")


GitHub - dioptra-io/iris-client at pythonawesome.com
Python client for the Iris API. Contribute to dioptra-io/iris-client development by creating an account on GitHub.