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.0rc6.tar.gz
(9.1 kB
view details)
Built Distribution
File details
Details for the file pydaisi-0.2.0rc6.tar.gz
.
File metadata
- Download URL: pydaisi-0.2.0rc6.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 | 907cc76478c66c26ac8f95c05608b6f50cf29292496c6346ab70503d0aeb4c37 |
|
MD5 | fbf034c47e78a0cc3df1f3d374a71261 |
|
BLAKE2b-256 | d44f7c2b5d906ef87de639c35571769d3dce0be8edfdd081ba4f65f1479611d7 |
Provenance
File details
Details for the file pydaisi-0.2.0rc6-py3-none-any.whl
.
File metadata
- Download URL: pydaisi-0.2.0rc6-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 | 1e6acb0b72b865a608a33ce04b39ff5709d0d690b7d1b7dd62d2eaae416380bb |
|
MD5 | 42af800db14491add151485936c48315 |
|
BLAKE2b-256 | 44512413eb2ab1ef49896ff94a3b676bfc712887e70569501ffb602fa69652ec |