{"id":23504,"library":"dask-gateway","title":"Dask Gateway","description":"A client library for interacting with a Dask Gateway server, enabling scalable multi-tenant HPC and cloud deployments. Version 2026.3.0 supports Python ≥3.10. Released ~2x per year, stable API.","status":"active","version":"2026.3.0","language":"python","source_language":"en","source_url":"https://github.com/dask/dask-gateway/","tags":["dask","distributed-computing","hpc","multi-tenant","scheduler"],"install":[{"cmd":"pip install dask-gateway","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install dask-gateway[kerberos]","lang":"bash","label":"With Kerberos auth"},{"cmd":"pip install dask-gateway[jupyter]","lang":"bash","label":"With Jupyter integration"}],"dependencies":[{"reason":"Core dependency for distributed computing","package":"dask","optional":false},{"reason":"Configuration parsing","package":"pyyaml","optional":false},{"reason":"Async HTTP client","package":"tornado","optional":false},{"reason":"Kerberos authentication","package":"kerberos","optional":true}],"imports":[{"note":"GatewayCluster is a top-level alias for the client class; direct import from .client is internal and may break.","wrong":"from dask_gateway.client import GatewayCluster","symbol":"GatewayCluster","correct":"from dask_gateway import GatewayCluster"},{"note":"Gateway is available at the top-level package; importing from .gateway is an internal path.","wrong":"from dask_gateway.gateway import Gateway","symbol":"Gateway","correct":"from dask_gateway import Gateway"}],"quickstart":{"code":"import os\nfrom dask_gateway import GatewayCluster\n\n# Create a cluster with token auth (or env vars)\ncluster = GatewayCluster(\n    address=os.environ.get('DASK_GATEWAY_ADDRESS', 'http://gateway:8080'),\n    proxy_address=os.environ.get('DASK_GATEWAY_PROXY_ADDRESS', 'gateway:8786'),\n    auth='jupyterhub' if os.environ.get('JUPYTERHUB_USER') else None\n)\ncluster.scale(2)\nclient = cluster.get_client()\n# Submit work\nclient.close()\ncluster.close()","lang":"python","description":"Creates a Dask Gateway cluster, scales to 2 workers, and gets a client."},"warnings":[{"fix":"Pass `auth='jupyterhub'` when using JupyterHub, or configure `DASK_GATEWAY_AUTH` env var.","message":"In v2024.1.0, the default auth no longer falls back to 'jupyterhub'. You must explicitly pass `auth='jupyterhub'` or set environment variables.","severity":"breaking","affected_versions":">=2024.1.0"},{"fix":"Replace `cluster.adapt(...)` with `cluster.auto_scale(...)`.","message":"The `GatewayCluster.adapt()` method is deprecated. Use `auto_scale()` instead.","severity":"deprecated","affected_versions":">=2023.10.0"},{"fix":"Ensure Dask Gateway server has `kerberos.principal` set correctly in its config.","message":"When using Kerberos auth, the server must have the same Kerberos principal configured. Otherwise, authentication fails with a vague HTTP 401.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install dask-gateway`.","cause":"dask-gateway not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'dask_gateway'"},{"fix":"Pass the correct `auth` parameter (e.g., `auth='jupyterhub'`) or set `DASK_GATEWAY_AUTH` environment variable.","cause":"Invalid or missing authentication credentials.","error":"dask_gateway.exceptions.GatewayError: 401 Unauthorized - authentication failed"},{"fix":"Upgrade dask-gateway: `pip install --upgrade dask-gateway`.","cause":"In older versions (pre-2023.1.0), the `proxy_address` parameter was not available.","error":"TypeError: __init__() got an unexpected keyword argument 'proxy_address'","affected_versions":"<2023.1.0"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}