Metadata-Version: 2.1
Name: dask-saturn
Version: 0.0.2
Summary: Dask Cluster objects in Saturn Cloud
Home-page: https://saturncloud.io/
Maintainer: Saturn Cloud Developers
Maintainer-email: dev@saturncloud.io
License: BSD-3-Clause
Project-URL: Documentation, http://docs.saturncloud.io
Project-URL: Source, https://github.com/saturncloud/dask-saturn
Project-URL: Issue Tracker, https://github.com/saturncloud/dask-saturn/issues
Keywords: dask saturn cloud distributed cluster
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: BSD License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: System :: Distributed Computing
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: distributed
Requires-Dist: requests

# dask-saturn
Python library for interacting with [Dask](https://dask.org/) clusters in
[Saturn Cloud](https://www.saturncloud.io/).

Dask-Saturn mimics the API of
[Dask-Kubernetes](https://github.com/dask/dask-kubernetes), but allows the user
to interact with clusters created within
[Saturn Cloud](https://www.saturncloud.io/).

## Start cluster
In order to interact with a Dask cluster, the cluster must first be created in
the Saturn User Interface. Then, from within a Jupyter notebook, you can start
the cluster and adjust the number of workers.

```python
from dask_saturn import SaturnCluster

cluster = SaturnCluster
cluster
```

## Adjust number of workers
Once you have a cluster you can interact with it via the jupyter
widget, or using the `scale` and `adapt` methods.

For example, to manually scale up to 20 workers:

```python
cluster.scale(20)
```

To create an adaptive cluster that controls its own scaling:

```python
cluster.adapt(minimum=1, maximum=20)
```

## Interact with client
To submit tasks to the cluster, you sometimes need access to the
`Client` object. Instantiate this with the cluster as the only argument:

```python
from distributed import Client

client = Client(cluster)
client
```

## Close cluster

To terminate all resources associated with a cluster, use the
`close` method:

```python
cluster.close()
```


