Python client for DEDL Stack services
Project description
DestinE Data Lake (DEDL) Stack Client
Python client to facilitate the use of DestinE Data Lake Stack Service.
Installation
Install the client library with pip:
pip install dedl-stack-client
Usage
Dask
An example notebook is provided here. The client will guide a user through the needed authentication flow and will automatically create dedicated Dask cluster on each DEDL bridge.
from dedl_stack_client.authn import DaskOIDC
from dedl_stack_client.dask import DaskMultiCluster
from rich.prompt import Prompt
myAuth = DaskOIDC(username=Prompt.ask(prompt="Username"))
myDEDLClusters = DaskMultiCluster(auth=myAuth)
myDEDLClusters.new_cluster()
The DaskMultiCluster class provides an abstraction layer to interact with the various clusters on each DEDL bridge. Computations can be directed to the different Dask clusters by making use of a context manager as given in the following.
with myDEDLClusters.as_current(location="central") as myclient:
myclient.compute(myarray)
with myDEDLClusters.as_current(location="lumi") as myclient:
myclient.compute(myarray)
Project details
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
File details
Details for the file dedl_stack_client-2024.2.2.tar.gz
.
File metadata
- Download URL: dedl_stack_client-2024.2.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b58bff9246512b7e0f1f53c2aca12c5d2bb1a11fa7750e13cbb4ac2e3464350 |
|
MD5 | c18c6235f40f746ab88911f13176db08 |
|
BLAKE2b-256 | bb64268ed936ecd49b111d5f9f7b2a7dd773ea634855c1f0423f8f448310fa13 |
File details
Details for the file dedl_stack_client-2024.2.2-py3-none-any.whl
.
File metadata
- Download URL: dedl_stack_client-2024.2.2-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4f4db7dbb1e68b1da0af166e24cb06f3d792bd8a0241e840c65091672b87cf6 |
|
MD5 | 772784ec8b4f37d6b0e84d47f4b4e774 |
|
BLAKE2b-256 | 047f452fe6b6ab8552c515f06bafe35d9b61745df164a03e9acec94077329f82 |