Skip to main content

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

To install the latest version of the client library run:

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)
with myDEDLClusters.as_current(location="leonardo") 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

dedl_stack_client-2024.8.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

dedl_stack_client-2024.8.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file dedl_stack_client-2024.8.1.tar.gz.

File metadata

  • Download URL: dedl_stack_client-2024.8.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for dedl_stack_client-2024.8.1.tar.gz
Algorithm Hash digest
SHA256 8300c02afd81f099c1fc49b6d39b7eee9f7c67ade10dc81e14a46f077b256427
MD5 2a18bc37e8ec9477e3ee7223a618b4d5
BLAKE2b-256 757f754f11ebbc4887f4bd941ca0c17a7652c18640a2857d252ebabf2a90ef1d

See more details on using hashes here.

File details

Details for the file dedl_stack_client-2024.8.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dedl_stack_client-2024.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ceb9aad54046eb9a3602b85e503f7c0077d71e2ccecc21efd30d10583afab707
MD5 fcb4f88e73a3b920528378113a363673
BLAKE2b-256 b1147a248e4b5781da7c54b08abe71ecb963c534eb9ce500fb02a9ed29584abd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page