Registry / devops / coiled

coiled

JSON →
library1.135.3pypypi✓ verified 23d ago

Coiled is a Python client library that simplifies scaling Python code and Dask clusters on the cloud (AWS, GCP, Azure). It handles cloud resource management, networking, and software environments, allowing data engineers and scientists to focus on their code. The library is actively maintained, with frequent updates to support new features and cloud capabilities. Its current version is 1.134.0, and it generally follows a continuous release cadence with frequent minor updates.

pip install "coiled[dask]"
INSTALL
IMPORT
SIG · COILED
C
coiled
devopspythonv1.135.3
Install
19.1s avg
Import
2578ms
Disk
202MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.135.3 · 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.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 19.1s · import 2.578s · 204MB
202MB installed
● package 202MB
Code
Verified usage

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

Cluster
from coiled import Cluster
function
from coiled import function
Used as a decorator for serverless functions.

This quickstart demonstrates how to create and use a Dask cluster and a serverless Python function with Coiled. Before running, ensure you have authenticated with `coiled login` and connected your cloud account using `coiled setup <aws|gcp|azure>` via the Coiled CLI. You can specify a software environment for consistency or Coiled will attempt to synchronize your local environment.

import coiled import dask.dataframe as dd import os # Ensure you are logged into Coiled via 'coiled login' in your terminal # and have connected your cloud account via 'coiled setup <aws|gcp|azure>'. # Quickstart for Dask Cluster try: cluster = coiled.Cluster( n_workers=5, software="dask-2023.12.0", # Specify a software environment or Coiled will try to sync your local env region=os.environ.get('COILED_REGION', 'us-east-1') # Use an environment variable for region ) client = cluster.get_client() print(f"Dask Dashboard link: {client.dashboard_link}") # Example Dask computation df = dd.read_csv("s3://dask-data/nyc-taxi/2015/yellow_tripdata_2015-01.csv", assume_missing=True) result = df.groupby('passenger_count').tip_amount.mean().compute() print("Dask Cluster computation result:") print(result) client.close() cluster.close() print("Dask Cluster closed.") except Exception as e: print(f"Error with Dask Cluster quickstart: {e}") print("Please ensure you have run 'coiled login' and 'coiled setup <cloud>' and set COILED_REGION if needed.") # Quickstart for Serverless Function # For serverless functions, you can also specify memory, cpu, region, etc. # e.g., @coiled.function(memory='512 GB', cpu=128, region='us-east-2') @coiled.function() def my_serverless_function(x): import time time.sleep(2) # Simulate work return x * 2 try: print("\nRunning serverless function...") future = my_serverless_function.submit(10) serverless_result = future.result() print(f"Serverless function result: {serverless_result}") except Exception as e: print(f"Error with Serverless Function quickstart: {e}") print("Serverless functions also require 'coiled login' and cloud setup.")
coiled --version
Debug
Known issues
gotchaEnvironment synchronization can be tricky. By default, Coiled attempts to replicate your local Python environment on the remote VMs. This can sometimes lead to discrepancies if local packages are not perfectly available or compatible in the cloud environment. Explicitly defining a software environment (e.g., using `software='my-env'` or a `container='my-docker-image'`) is often more robust, especially for production or complex setups.
fix
Use `coiled.Cluster(software='my-software-environment')` or `coiled.Cluster(container='daskdev/dask:latest')` to specify a managed environment or Docker image. For serverless functions, similar options apply to the `@coiled.function` decorator.
affects: All versions
gotchaAuthentication and cloud setup are prerequisites. Users must run `coiled login` and `coiled setup <aws|gcp|azure>` from their CLI before using the Python client to provision resources. Skipping these steps will result in authentication or permission errors.
fix
Run `pip install coiled` then `coiled login` and `coiled setup <your-cloud-provider>` in your terminal to authenticate and configure your cloud account.
affects: All versions
gotchaResource shutdown is not automatic by default for all resources. While Coiled clusters and functions have idle timeouts, explicitly closing `client` and `cluster` objects in your script (`client.close()`, `cluster.close()`) is a good practice to release resources promptly and avoid unexpected cloud costs, especially in interactive sessions or long-running scripts.
fix
Always include `client.close()` and `cluster.close()` in your scripts when you are done with the Dask cluster. For `coiled.function` with `keepalive` set, be mindful of the duration to prevent VMs from staying active longer than needed.
affects: All versions
gotchaSpecifying cloud regions is important for data locality and cost. Not setting a specific region might lead to clusters being provisioned in a default region that is geographically distant from your data sources, incurring higher data transfer costs and increased latency.
fix
Always specify the `region` parameter when creating a `coiled.Cluster` or using `@coiled.function` to match the location of your data (e.g., `coiled.Cluster(region='us-east-2')`).
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'coiled'
The 'coiled' Python package is not installed in the environment where the code is being executed.
fix
Install the coiled library using pip: `pip install coiled` or conda: `conda install -c coiled coiled`.
TypeError: TLS expects a ssl_context argument of type ssl.SSLContext
This error typically indicates an issue with the SSL/TLS configuration when connecting to a Coiled Dask cluster, often when the distributed client expects an SSL context but doesn't receive it, particularly when using `prefect-dask` or direct Dask client connections.
fix
Ensure proper SSL configuration is provided to your Dask client or task runner, often by explicitly setting a `security` parameter in the `coiled.Cluster` or `DaskTaskRunner` configuration, or by passing an `ssl_context` argument where expected.
Google auth failed to initialize error
This issue arises when the Coiled client cannot properly authenticate with Google services, often due to browser settings blocking cookies or other authentication flow interferences.
fix
Ensure your web browser allows all cookies, temporarily disable browser extensions like 'Brave Shields' if in use, or re-authenticate the Coiled client using the `coiled login` command.
AttributeError: No option 'environment' available
This error occurs when attempting to configure Dask options, specifically related to environment variables, in a manner or with a key name that is not recognized or supported by the current versions of Dask, distributed, or Coiled, especially when using `dask.config.set()` or `coiled.Cluster` configurations.
fix
Use the correct and supported method for setting environment variables for Dask workers within Coiled, which might involve using the `environment_vars` parameter directly in `coiled.Cluster` or passing a dictionary of Dask configurations via the `config` argument, e.g., `coiled.Cluster(config={'distributed.scheduler.worker-saturation': '1.0'})`.
Upgrade
Version history
1.135.3latest on PyPI · released Aug 14, 2026
Audit
Dependencies
daskoptionalRequired for Dask cluster functionality, which is a primary use case.
distributedoptionalDask's distributed scheduler, necessary for Dask clusters.
Agent activity
58 hits · last 30 days
node
48
OpenAI (training)
1
Resources