Skip to content

Commit 02bb4e8

Browse files
Add clusters doc api-reference for python (#48)
1 parent 0931bab commit 02bb4e8

File tree

5 files changed

+98
-0
lines changed

5 files changed

+98
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: ClustersClient.all
3+
icon: circle-nodes
4+
---
5+
6+
```python
7+
def ClustersClient.all(): list[Cluster]
8+
```
9+
10+
List all available clusters.
11+
12+
## Returns
13+
14+
A list of all available clusters.
15+
16+
<RequestExample>
17+
```python Python
18+
clusters = cluster_client.all()
19+
```
20+
</RequestExample>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: ClustersClient.create
3+
icon: circle-nodes
4+
---
5+
6+
```python
7+
def ClustersClient.create(name: str): Cluster
8+
```
9+
10+
Create a cluster.
11+
12+
## Parameters
13+
14+
<ParamField path="name" type="string">
15+
A display name for the cluster
16+
</ParamField>
17+
18+
## Returns
19+
20+
The created cluster object.
21+
22+
<RequestExample>
23+
```python Python
24+
cluster = cluster_client.create("My cluster")
25+
```
26+
</RequestExample>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: ClustersClient.delete
3+
icon: circle-nodes
4+
---
5+
6+
```python
7+
def ClustersClient.delete(cluster_or_slug: Cluster | str)
8+
```
9+
10+
Delete a cluster.
11+
12+
## Parameters
13+
14+
<ParamField path="cluster_or_slug" type="Cluster | str">
15+
The cluster or cluster slug to delete.
16+
</ParamField>
17+
18+
<RequestExample>
19+
```python Python
20+
cluster_client.delete(cluster)
21+
```
22+
</RequestExample>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: ClustersClient.find
3+
icon: circle-nodes
4+
---
5+
6+
```python
7+
def ClustersClient.find(cluster_or_slug: Cluster | str): Cluster
8+
```
9+
10+
Get a cluster by its slug.
11+
12+
## Parameters
13+
14+
<ParamField path="cluster_or_slug" type="Cluster | str">
15+
The cluster or cluster slug to get.
16+
</ParamField>
17+
18+
## Returns
19+
20+
A cluster object.
21+
22+
<RequestExample>
23+
```python Python
24+
cluster = cluster_client.find("my-cluster-CvufcSxcC9SKfe")
25+
```
26+
</RequestExample>

mint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@
210210
"api-reference/python/tilebox.workflows/TaskRunner.run_forever",
211211
"api-reference/python/tilebox.workflows/ExecutionContext.submit_subtask",
212212
"api-reference/python/tilebox.workflows/ExecutionContext.job_cache",
213+
"api-reference/python/tilebox.workflows/ClustersClient.create",
214+
"api-reference/python/tilebox.workflows/ClustersClient.find",
215+
"api-reference/python/tilebox.workflows/ClustersClient.delete",
216+
"api-reference/python/tilebox.workflows/ClustersClient.all",
213217
"api-reference/python/tilebox.workflows/JobCache.group",
214218
"api-reference/python/tilebox.workflows/JobCache.__iter__",
215219
"api-reference/python/tilebox.workflows/JobClient.submit",

0 commit comments

Comments
 (0)