> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/consume/activate/apis/sdk/python-sdk.md).

# Python SDK

Use the Python SDK when a Python application, notebook, or automation needs typed access to Data Product APIs.

The SDK wraps the API groups into a single `VulcanClient`.

## Installation

Download the SDK package, then install it locally:

{% file src="/files/aeEha8JN3dCm7UYofCR8" %}

```bash
pip install vulcan_sdk-0.1.0-py3-none-any.whl
```

## Create a client

```python
from vulcan_sdk import VulcanClient

client = VulcanClient(
    fqdn="example.dataos.io",
    dp_name="b2b_saas",
    access_token="<your-dataos-api-token>",
    tenant="public",
)
```

The SDK builds the base URL automatically:

```
https://{fqdn}/vulcan/tenants/{tenant}/data-products/{tenant}-{dp_name}/api/v1
```

## Constructor options

<table><thead><tr><th width="148.38262939453125">Parameter</th><th width="129.7081298828125">Type</th><th width="120.22802734375">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>fqdn</code></td><td><code>str</code></td><td>Yes</td><td>DataOS FQDN, for example <code>example.dataos.io</code>.</td></tr><tr><td><code>dp_name</code></td><td><code>str</code></td><td>Yes</td><td>Data Product name, for example <code>b2b_saas</code>.</td></tr><tr><td><code>access_token</code></td><td><code>str</code></td><td>Yes</td><td><a href="/pages/7rh6mFCr0rhl6vO76XjW#get-a-dataos-api-token">DataOS API token</a>.</td></tr><tr><td><code>tenant</code></td><td><code>str</code></td><td>Yes</td><td>Tenant name, for example <code>public</code>.</td></tr><tr><td><code>timeout</code></td><td><code>float</code></td><td>No</td><td>Request timeout in seconds. Default: <code>30.0</code>.</td></tr><tr><td><code>verify_ssl</code></td><td><code>bool</code></td><td>No</td><td>Whether to verify TLS certificates. Default: <code>True</code>.</td></tr></tbody></table>

## Query example

```python
import time

stmt = client.query.submit_statement("SELECT order_id, total FROM orders LIMIT 100")

terminal = {"SUCCESS", "FAILED", "CANCELLED", "SUCCEEDED"}
while stmt.status.upper() not in terminal:
    time.sleep(2)
    stmt = client.query.get_statement(stmt.id)

result = client.query.get_statement_result(stmt.id)
print(result.cols)
for row in result.rows:
    print(row)
```

## API groups

<table><thead><tr><th width="197.2034912109375">Group</th><th>Access via</th></tr></thead><tbody><tr><td>Metadata</td><td><code>client.metadata</code></td></tr><tr><td>Query</td><td><code>client.query</code></td></tr><tr><td>Activity</td><td><code>client.activity</code></td></tr><tr><td>Data Quality</td><td><code>client.dq</code></td></tr><tr><td>Quality (legacy)</td><td><code>client.quality</code></td></tr><tr><td>Perspectives</td><td><code>client.perspectives</code></td></tr><tr><td>Notifications</td><td><code>client.notifications</code></td></tr><tr><td>Followers</td><td><code>client.followers</code></td></tr></tbody></table>

## Troubleshooting

The SDK raises `VulcanError` for API failures, authentication failures, invalid requests, missing parameters, and unexpected API responses.

```python
from vulcan_sdk import VulcanError

try:
    plan = client.activity.get_plan("nonexistent-id")
except VulcanError as e:
    print(e.status_code)
    print(e.detail)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/consume/activate/apis/sdk/python-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
