API#

coiled.analytics.register([client])

Register Coiled analytics with your Dask cluster.

coiled.analytics.list_clusters([account, ...])

List clusters associated to this account

coiled.analytics.list_computations(cluster_id)

List computations associated to a cluster

coiled.analytics.list_events(cluster_id[, ...])

List events associated to a cluster

coiled.analytics.register(client=None)[source]#

Register Coiled analytics with your Dask cluster.

Parameters

client (Optional[Client]) – The Dask client that you want to connect to This will use the most recently created Dask client by default (usually what you want anyway)

Examples

>>> from dask.distributed import Client
>>> client = Client()
>>> import coiled.analytics
>>> coiled.analytics.register()

Or use this module as a preload

$ dask-scheduler –preload coiled.analytics

coiled.analytics.list_clusters(account=None, since='7 days', user=None)[source]#

List clusters associated to this account

Clusters arrive in reverse chronological order (the first element is the most recent).

Parameters
  • account (Optional[str]) – The account whose clusters you want to list You must be a member of this account Your default account will be used if none is provided

  • since (Optional[str]) – The amount of time to go back in history to list clusters. Defaults to seven days. Leave as None to collect all history. Accepts any value parseable by dask.utils.parse_timedelta

  • user (Optional[str]) – Optionally filter on username Providing None selects all users

Examples

>>> import coiled.analytics
>>> coiled.analytics.list_clusters()  
>>> coiled.analytics.list_clusters(since="30 days", user="alice")  
coiled.analytics.list_computations(cluster_id, account=None)[source]#

List computations associated to a cluster

Parameters
  • cluster_id (int) – The identifier of the cluster that you want to select

  • account (Optional[str]) – The account whose clusters you want to list You must be a member of this account Your default account will be used if none is provided

Examples

>>> import coiled.analytics
>>> clusters = coiled.analytics.list_clusters()  
>>> coiled.analytics.list_computations(clusters[0]["id"])  

See also

list_clusters

coiled.analytics.list_events(cluster_id, account=None)[source]#

List events associated to a cluster

Parameters
  • cluster_id (int) – The identifier of the cluster that you want to select

  • account (Optional[str]) – The account whose clusters you want to list You must be a member of this account Your default account will be used if none is provided

Examples

>>> import coiled.analytics
>>> clusters = coiled.analytics.list_clusters()  
>>> coiled.analytics.list_events(clusters[0]["id"])  

See also

list_clusters