Python client for the Iris API.
Project description
🕸️ Iris Python Client
Minimal 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
# 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("user@example.org", "password") as client:
measurements = client.get("/measurements/").json()
# Asynchronous client
async with AsyncIrisClient("user@example.org", "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/")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for dioptra-iris-client-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4dc5337c9a04b6ce9280dbe412cf60f7322848cc79983f26e0715bd9b094f8f0 |
|
MD5 | 8a931ca83976597928b71d263793b65e |
|
BLAKE2b-256 | 866bc7e434ee86ef7815f0ba73288bdef0ceafd39ffe1e3bb27d769db337b348 |
Close
Hashes for dioptra_iris_client-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95d29915eec2273078491a1cfa77fe2962266621dbda2a397e4e74a21c182301 |
|
MD5 | 7bda72d92005dd6c4a418b962b5a77f3 |
|
BLAKE2b-256 | 161df259c27a0cfe23974db33437c629b462084294f74469d3b770cbd4fee93a |