🕸️ Iris Python Client
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:
- If one of
base_url,usernameorpasswordis specified, these values will be used. - If none of the previous values are specified, and one of
IRIS_BASE_URL,IRIS_USERNAMEorIRIS_PASSWORDenvironment variables are present, these values will be used. - If none of the previous values are specified, and the file
~/.config/iris/credentials.jsonexists, the fieldsbase_url,usernameandpasswordwill be used.
Release files for dioptra-iris-client-elena 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dioptra_iris_client_elena-0.5.2.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dioptra_iris_client_elena-0.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / dioptra_iris_client_elena-0.5.2.tar.gz
| Download URL | dioptra_iris_client_elena-0.5.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
089299ed7707c42d71dd8ade73a6ccb6af41565d0e8b1eb136c96a6d1c54f454
|
|
BLAKE2b-256 checksum How to use checksums |
451b25bbec41768a9bd5a4f52cc97604774688d87b6a723929dc68b6e1859f1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / dioptra_iris_client_elena-0.5.2-py3-none-any.whl
| Download URL | dioptra_iris_client_elena-0.5.2-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ade605903e93ce5b58b571b1a76ace488244e4952117cb71e80082b0e2e39055
|
|
BLAKE2b-256 checksum How to use checksums |
ac4b191d245cb53d68e53ff3d6dc7585069faf8a25684b12f7f2b586c7906186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|