Registry / data / dask-cloudprovider

dask-cloudprovider

JSON →
library2025.9.0pypypiunverified

Dask Cloud Provider (dask-cloudprovider) is a Python library that enables native cloud integration for Dask. It provides classes for constructing and managing ephemeral Dask clusters on various cloud platforms, including AWS, GCP, Azure, DigitalOcean, Hetzner, IBM Cloud, OpenStack, and Nebius. It also includes plugins that make Dask components cloud-aware. The library aims to simplify the deployment and operation of Dask clusters on the cloud. As of its latest version 2025.9.0, released in September 2025, it is actively maintained with releases published automatically when tags are pushed to GitHub.

pip install dask-cloudprovider
INSTALL
IMPORT
SIG · DASK-CLOUDPROVIDER
D
dask-cloudprovider
datapythonv2025.9.0
Install
13.3s avg
Import
2230ms
Disk
91MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2025.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.945 runs
installs and imports cleanly · install 0.0s · import 2.305s · 92.7MB
glibc
py 3.103.945 runs
installs and imports cleanly · install 13.3s · import 2.155s · 96MB
91MB installed
● package 91MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

EC2Cluster
from dask_cloudprovider.aws import EC2Cluster
from dask_cloudprovider.aws import EC2Cluster
FargateCluster
from dask_cloudprovider.aws import FargateCluster
ECSCluster
from dask_cloudprovider.aws import ECSCluster

This quickstart demonstrates creating an ephemeral Dask cluster on AWS Fargate, connecting a client, running a simple computation, and ensuring resources are properly de-provisioned using a context manager. Users must have their cloud provider credentials configured (e.g., AWS CLI `aws configure` for AWS) for the cluster to provision successfully.

import os from dask_cloudprovider.aws import FargateCluster from dask.distributed import Client # Ensure AWS credentials are configured (e.g., via AWS CLI or env vars) # For a real deployment, consider setting DASK_CLOUDPROVIDER__AWS__REGION # and other specifics via environment variables or a Dask config file. # Example: os.environ['AWS_ACCESS_KEY_ID'] = 'YOUR_ACCESS_KEY' # os.environ['AWS_SECRET_ACCESS_KEY'] = 'YOUR_SECRET_KEY' # os.environ['AWS_DEFAULT_REGION'] = 'us-east-1' try: # Create a Dask cluster using AWS Fargate # This will provision cloud resources # Using a context manager ensures resources are closed automatically with FargateCluster(n_workers=1, worker_cpu=1024, worker_memory=2048) as cluster: print(f"Dask Dashboard link: {cluster.dashboard_link}") # Connect a Dask client to the cluster client = Client(cluster) print("Dask Client connected.") # Perform some Dask computation futures = client.map(lambda x: x * x, range(10)) results = client.gather(futures) print(f"Computation results: {results}") client.close() print("Dask Client closed.") print("Dask Cluster resources automatically closed (due to context manager).") except Exception as e: print(f"An error occurred: {e}") print("Please ensure your AWS credentials are configured and that you have sufficient permissions.")
Debug
Known issues
gotchaFailing to explicitly close cluster resources can lead to unexpected cloud costs. While dask-cloudprovider attempts garbage collection, it is not guaranteed.
fix
Always call `cluster.close()` when done with the cluster, or use the cluster object within a `with` statement (context manager) to ensure automatic cleanup.
affects: All versions
gotchaCloud provider-specific dependencies (e.g., `boto3` for AWS, `google-cloud-sdk` for GCP) are not installed by default with `pip install dask-cloudprovider`. Attempting to use a cluster manager for an uninstalled provider will result in a `ModuleNotFoundError` or similar import error.
fix
Install `dask-cloudprovider` with the appropriate extras, e.g., `pip install dask-cloudprovider[aws]` for AWS, `pip install dask-cloudprovider[gcp]` for Google Cloud, or `pip install dask-cloudprovider[all]` for all providers.
affects: All versions
gotchaBy default, many cluster managers expose the Dask scheduler and dashboard to the internet via a public IP address for ease of use. This can pose a security risk in production environments.
fix
Review the `security` section of the dask-cloudprovider documentation for your specific cluster manager. Configure appropriate security groups to restrict access (e.g., to a specific VPC or IP range), or disable public exposure if running within a trusted network.
affects: All versions
gotchaAuthentication credentials for your chosen cloud provider (e.g., AWS access keys, GCP project ID/service accounts, Azure service principals) must be pre-configured in your environment or via Dask's configuration system for cluster creation to succeed.
fix
Before running dask-cloudprovider code, ensure your cloud credentials are set up. This typically involves using the cloud provider's CLI tools (e.g., `aws configure`, `gcloud auth login`), setting environment variables (e.g., `AWS_ACCESS_KEY_ID`), or configuring a Dask `cloudprovider.yaml` file.
affects: All versions
Upgrade
Version history
2025.9.0latest on PyPI · released Sep 5, 2025
Audit
Dependencies
daskrequiredCore dependency for distributed computing framework.
distributedrequiredCore dependency for Dask's distributed scheduler and workers.
boto3optionalRequired for AWS cluster managers (e.g., EC2Cluster, FargateCluster).
google-cloud-sdkoptionalRequired for Google Cloud Platform cluster managers (e.g., GCPCluster).
azure-mgmt-computeoptionalRequired for Azure cluster managers (e.g., AzureVMCluster).
digitaloceanoptionalRequired for DigitalOcean cluster managers (e.g., DropletCluster).
Agent activity
32 hits · last 30 days
node
26
OpenAI (training)
1
Resources
dask-cloudprovider — pip install dask-cloudprovider · libregistry