> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowra.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDK

> Install the flowra package and call tools, workflows, skills, and raw HTTP helpers.

This guide walks through the `flowra` Python package. Overview: [SDKs](/guides/sdk).

## Install

```bash theme={null}
pip install flowra
```

From the Flowra monorepo (if unpublished):

```bash theme={null}
pip install -e sdks/python
```

Requires Python 3.10+. The client uses the standard library only (no extra runtime deps).

## Create a client

```python theme={null}
import os
from flowra import Flowra

flowra = Flowra(api_key=os.environ["FLOWRA_API_KEY"])
```

Optional `username` sets `x-username` for [multi-tenancy](/guides/multi-tenancy):

```python theme={null}
flowra = Flowra(api_key="...", username="customer_alice")
```

Or clone for another end user:

```python theme={null}
alice = flowra.as_user("customer_alice")
alice.connections.create_link({"authConfigId": "..."})
```

## List tools and run a workflow

```python theme={null}
profile = flowra.get_profile()
tools = flowra.tools.list(limit=10)

run = flowra.workflows.run(
    "WORKFLOW_ID",
    {"input": {"message": "hello from the SDK"}},
)
```

## Skills and MCP

```python theme={null}
skills = flowra.skills.list()
servers = flowra.mcp.list()
```

## Knowledge (per end user)

```python theme={null}
alice = flowra.as_user("customer_alice")
collections = alice.knowledge.list()
```

## Escape hatch: `request`

Call any path on the public API:

```python theme={null}
flowra.request("GET", "/api/v1/toolkits", query={"limit": 5})
```

Use this when a facade method is missing. Full schemas: [API reference](/api-reference).

## Errors

HTTP failures raise SDK errors (see package `flowra.errors`). Catch around calls that may fail (missing connection, invalid id, …).

## Next

* [TypeScript SDK](/guides/sdk-typescript)
* [Run a workflow](/recipes/run-a-workflow)
* [Multi-tenant basics](/recipes/multi-tenant-basics)
* [API reference](/api-reference)
