# API Clients

## Golang

### Example

```go
import "github.com/datarhei/core-client-go/v16"

client, err := coreclient.New(coreclient.Config{
    Address: "https://example.com:8080",
    Username: "foo",
    Password: "bar",
})
if err != nil {
    ...
}

processes, err := client.ProcessList(coreclient.ProcessListOptions{})
if err != nil {
    ...
}
```

### Repository

{% embed url="<https://github.com/datarhei/core-client-go>" %}

## Python3

### Install

```
pip install https://github.com/datarhei/core-client-python/archive/refs/heads/main.tar.gz
```

### Example

{% tabs %}
{% tab title="Sync" %}

```python
from core_client import Client

client = Client(
    base_url="https://example.com:8080",
    username="foo",
    password="bar"
)
client.login()

process_list = client.v3_process_get_list()
for process in processes:
    print(process.id)
```

{% endtab %}

{% tab title="Async" %}

```python
import asyncio
from core_client import AsyncClient

client = AsyncClient(
    base_url="https://example.com:8080",
    username="foo",
    password="bar"
)
client.login()

process_list = await client.v3_process_get_list()
for process in processes:
    print(process.id)
```

{% endtab %}
{% endtabs %}

### Repository

{% embed url="<https://github.com/datarhei/core-client-python>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datarhei.com/core/api-clients.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
