A Python interface for the Daisi Platform
Project description
Simples steps for using the PyDaisi SDK
Preliminary tasks
Install with PIP:
pip install pydaisi
(Optional) Set your personal access token:
Create your personal access token
Set it in the environment:
export DAISI_ACCESS_TOKEN=a1b2c3d4e5f67890abcdef124567890
or in a .env
file:
DAISI_ACCESS_TOKEN=a1b2c3d4e5f67890abcdef124567890
Using PyDaisi
from pydaisi import Daisi
# instantiate a Daisi object
daisi = Daisi("my-pebble-tutorial")
# call a Daisi function. You can also use position parameters: daisi.median("London")
temp = daisi.median(city="London")
print(f"Median temperature in London was: {temp.value}")
# call a function but return without waiting for it to complete
temp2 = daisi.dispath("median","Paris")
# see if it's done
if temp2.get_status() == "FINISHED":
# get the results the same way as the blocking call:
print("Median: ", {temp2.value})
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
pydaisi-0.2.0rc9.tar.gz
(9.1 kB
view details)
Built Distribution
File details
Details for the file pydaisi-0.2.0rc9.tar.gz
.
File metadata
- Download URL: pydaisi-0.2.0rc9.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cdc561390eab63ce4d57adb7be67733e248d7971eb32f40a950ce29c5ee1ca8 |
|
MD5 | 4021c1cffceb6f10409c83ca7308e43e |
|
BLAKE2b-256 | d8271cbd94aa8923473ffe2b324fdb97af723ffd94d5a95e3bbda85899f989d4 |
Provenance
File details
Details for the file pydaisi-0.2.0rc9-py3-none-any.whl
.
File metadata
- Download URL: pydaisi-0.2.0rc9-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8deec5baf29031fc23c6c9a7ec4e29e0be82b5d04da9a53575db73a120b1b26 |
|
MD5 | ba0ffb96d321395420d5599fcb273c75 |
|
BLAKE2b-256 | a8c96c4485f90a13235f00564ad220e16cba4497d6384811df2b2e1041e28ac2 |