Skip to content

Add clusters doc api-reference for python #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions api-reference/python/tilebox.workflows/ClustersClient.all.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: ClustersClient.all
icon: circle-nodes
---

```python
def ClustersClient.all(): list[Cluster]
```

List all available clusters.

## Returns

A list of all available clusters.

<RequestExample>
```python Python
clusters = cluster_client.all()
```
</RequestExample>
26 changes: 26 additions & 0 deletions api-reference/python/tilebox.workflows/ClustersClient.create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: ClustersClient.create
icon: circle-nodes
---

```python
def ClustersClient.create(name: str): Cluster
```

Create a cluster.

## Parameters

<ParamField path="name" type="string">
A display name for the cluster
</ParamField>

## Returns

The created cluster object.

<RequestExample>
```python Python
cluster = cluster_client.create("My cluster")
```
</RequestExample>
22 changes: 22 additions & 0 deletions api-reference/python/tilebox.workflows/ClustersClient.delete.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: ClustersClient.delete
icon: circle-nodes
---

```python
def ClustersClient.delete(cluster_or_slug: Cluster | str)
```

Delete a cluster.

## Parameters

<ParamField path="cluster_or_slug" type="Cluster | str">
The cluster or cluster slug to delete.
</ParamField>

<RequestExample>
```python Python
cluster_client.delete(cluster)
```
</RequestExample>
26 changes: 26 additions & 0 deletions api-reference/python/tilebox.workflows/ClustersClient.find.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: ClustersClient.find
icon: circle-nodes
---

```python
def ClustersClient.find(cluster_or_slug: Cluster | str): Cluster
```

Get a cluster by its slug.

## Parameters

<ParamField path="cluster_or_slug" type="Cluster | str">
The cluster or cluster slug to get.
</ParamField>

## Returns

A cluster object.

<RequestExample>
```python Python
cluster = cluster_client.find("my-cluster-CvufcSxcC9SKfe")
```
</RequestExample>
4 changes: 4 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@
"api-reference/python/tilebox.workflows/TaskRunner.run_forever",
"api-reference/python/tilebox.workflows/ExecutionContext.submit_subtask",
"api-reference/python/tilebox.workflows/ExecutionContext.job_cache",
"api-reference/python/tilebox.workflows/ClustersClient.create",
"api-reference/python/tilebox.workflows/ClustersClient.find",
"api-reference/python/tilebox.workflows/ClustersClient.delete",
"api-reference/python/tilebox.workflows/ClustersClient.all",
"api-reference/python/tilebox.workflows/JobCache.group",
"api-reference/python/tilebox.workflows/JobCache.__iter__",
"api-reference/python/tilebox.workflows/JobClient.submit",
Expand Down