Skip to main content

🕸️ Iris Python Client

Tests Coverage PyPI

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

Installation

pip install dioptra-iris-client

Usage

from iris_client import IrisClient, AsyncIrisClient

base_url = "https://api.iris.dioptra.io"
username = "user@example.org"
password = "password"

# Synchronous client
with IrisClient(base_url, username, password) as client:
    measurements = client.get("/measurements/").json()

# Asynchronous client
async with AsyncIrisClient(base_url, username, 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/")

Credential provider chain

The Iris client looks for credentials in a way similar to the AWS SDK:

  1. If one of base_url, username or password is specified, these values will be used.
  2. If none of the previous values are specified, and one of IRIS_BASE_URL, IRIS_USERNAME or IRIS_PASSWORD environment variables are present, these values will be used.
  3. If none of the previous values are specified, and the file ~/.config/iris/credentials.json exists, the fields base_url, username and password will be used.

Download files

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

Source Distribution

dioptra_iris_client-0.5.9.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

dioptra_iris_client-0.5.9-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file dioptra_iris_client-0.5.9.tar.gz.

File metadata

  • Download URL: dioptra_iris_client-0.5.9.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for dioptra_iris_client-0.5.9.tar.gz
Algorithm Hash digest
SHA256 e499727f22d7ccc0a7f7946473f8c50ad4bf1e0b9a8e3abc070e90380c052e9e
MD5 72ecc841ca57ecc846b62f1b9b758716
BLAKE2b-256 d153f152f4035a5c614c33980a6706c2a0aa609e0c8e306fab7b6d00d68dcd94

See more details on using hashes here.

File details

Details for the file dioptra_iris_client-0.5.9-py3-none-any.whl.

File metadata

File hashes

Hashes for dioptra_iris_client-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 69d9de8d568132316eda8929fae3fa76e31a10de87e9e97141793522163181a0
MD5 787b20a84e5ea32b349c6e070cbff253
BLAKE2b-256 621ffb2267f501583f3cb977b3e79104a9cf6def556eb68ccc609d996aafc6fb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.9 This release

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

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