Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Python SDK

A typed Python client for integrating applications with Data Product APIs.

Connect once, then pull data, save views, and check on pipeline health using plain Python. No HTTP requests, no manual JSON parsing. You get back real Python objects with autocomplete, not raw dicts you have to guess the shape of.

Built on uplink and Pydantic v2.

On this page

Install

pip install vulcan_sdk-0.228.1.32-py3-none-any.whl

Requires Python 3.9+. Dependencies (pydantic, requests, uplink) are installed automatically with the SDK.

Connect

from vulcan_sdk import VulcanClient

client = VulcanClient(
    fqdn="example.dataos.io",       # your DataOS instance
    dp_name="clothing_retail",      # the data product you're connecting to
    access_token="<your-dataos-api-token>",
    tenant="public",
)

That's it. Every example below just reuses this client. The SDK builds the base URL for you:

Accept: application/json is set on every request so the server always returns JSON (not Parquet).

See what's inside a data product

Before you query anything, it helps to know what models, columns, and metrics you actually have to work with:

Need the full catalog instead (product info, lineage graph, gateway config, per-model freshness)? Use client.metadata.get().

Run a query and get your data

There are two ways to ask for data. Use whichever one feels natural to you.

Measures and dimensions, if you think in those terms:

Or just write SQL:

Need raw SQL against physical tables instead of the semantic layer? Use client.query.submit_statement(sql).

Either way, you get a response back immediately with a job id. The query itself runs in the background, so you need to wait for it to finish before you can grab the results:

Tip: if you'd rather work with a DataFrame, this takes one line:

If you'd rather write GraphQL, submit_semantic_rest takes it directly via graphql_body:

Need the generated warehouse SQL instead of executing the query? See the transpile-only recipe. Need to page through more than 50,000 rows? See the pagination recipe.

Querying a named metric

If the data product has metrics already defined, you can just ask for one by name:

If you need filters on top of that, use post_metric instead and poll for the result the same way you would for any other query:

Save a query so you don't have to rewrite it

Once a query has finished running, you can save it as a perspective: basically a named, shareable view that lives at its own slug:

request must be an actual PerspectiveCreateRequest / PerspectiveUpdateRequest instance (import both from vulcan_sdk); a plain dict raises AttributeError.

From then on you can just fetch it whenever you need it, no need to resubmit the query:

To see what's already been saved:

Connect from Power BI or Tableau

If you'd rather work in a BI tool, you can grab the connection files and open them there instead:

These are only populated for production deployments, so don't expect much from a dev or staging environment.

Know whether you can trust the data

If something looks off, you can dig into the specific rule behind it:

Older code may still use client.quality; it is kept for backward compatibility, but prefer client.dq for anything new. See client.quality below.

See what's been running behind the scenes

Stay in the loop

Follow a data product if you want to keep tabs on it:

And check what's happened recently:

Handling errors

Every failed call raises the same exception, so you really only need one except block anywhere you use the SDK:

Full method reference

Everything above covers the common cases. If you need something more specific, here's every method on every client.

client.metadata

Method
What it does
Returns

get()

Full catalog for the data product: name, version, fingerprint, product info, gateway config

MetadataResponse

get_semantic()

The semantic schema: models, dimensions, measures

SemanticSchema

download_powerbi()

Power BI connection file as raw bytes

bytes

download_tableau()

Tableau connector file as raw bytes

bytes

client.query

Method
What it does
Returns

submit_semantic_rest(query, *, graphql_body=None, meta=None)

Run a query using measures/dimensions, or GraphQL via graphql_body

StatementAccepted

submit_semantic_sql(sql, *, meta=None)

Run a query written as SQL

StatementAccepted

submit_statement(sql, *, meta=None)

Run raw SQL directly against physical tables, bypassing the semantic layer

StatementAccepted

get_statement(statement_id)

Check the status of a submitted query

StatementDetail

get_statement_result(statement_id)

Get the rows back for a completed query

StatementResult

get_metric(metric_name, **params)

Quick lookup of a named metric (dimensions, granularity, timezone, limit, offset as kwargs)

dict

post_metric(metric_name, body)

Named metric query with filters/grouping in the body

StatementAccepted

get_usage_metrics()

Query usage stats for this data product

UsageMetrics

Query syntax references: REST query format · SQL reference · GraphQL reference

client.perspectives

Method
What it does
Returns

list(*, limit=20, offset=0, owner=None, is_public=None)

List saved perspectives

PerspectivesListResponse

get(slug)

Fetch one perspective's details

PerspectiveDetail

get_result(slug, *, force_refresh=None)

Run the perspective's query and get the rows

StatementResult

create(slug, request: PerspectiveCreateRequest)

Save a completed query as a new perspective

PerspectiveDetail

update(slug, request: PerspectiveUpdateRequest)

Change a perspective's name, description, visibility, etc.

PerspectiveDetail

delete(slug)

Delete a perspective

dict

request must be an actual PerspectiveCreateRequest / PerspectiveUpdateRequest instance (import both from vulcan_sdk). A plain dict raises AttributeError.

client.followers

Method
What it does
Returns

get_follow_status()

Whether you're currently following this data product

FollowStatus

follow(*, metadata=None)

Follow this data product

Follower

unfollow()

Stop following this data product

Follower

get_analytics(*, granularity=None, start_ts=None, end_ts=None)

Follower counts, optionally broken down over time

FollowerAnalytics

list(*, limit=50, offset=0)

List everyone following this data product

FollowersListResponse

client.notifications

Method
What it does
Returns

list(*, run_id=None, plan_id=None, events=None, start_ts=None, end_ts=None, limit=50, offset=0)

List notifications, optionally filtered by run, plan, event type, or time range

NotificationsListResponse

client.dq

Method
What it does
Returns

get_summary()

Product-level data quality roll-up

DQSummary

list_rules(*, model=None, dimension=None, limit=50, offset=0)

List configured data quality rules and recent outcomes

RulesResponse

get_rule_by_name(model, dimension, name)

Look up a rule by model, dimension, and check name (result is under .rule)

RuleDetailResponse

get_rule(identity)

Look up a rule by its identity hash (result is under .rule)

RuleDetailResponse

client.quality (Data Quality, legacy)

Prefer client.dq for new code.

client.activity

Method
What it does
Returns

list_plans(*, model_names=None, limit=20, offset=0, start_ts=None, end_ts=None, success=None)

List deployment plans

PlansListResponse

get_plan(plan_id)

Fetch one plan's details

Plan

get_plan_git_diff(plan_id)

Git diff behind a plan

PlanGitDiffResponse

list_runs(*, model_names=None, success=None, limit=20, offset=0, start_ts=None, end_ts=None)

List pipeline runs

RunsListResponse

get_run(run_id)

Fetch one run's details

Run

get_model_runs(model_name, *, limit=20, offset=0)

Runs that touched a specific model

RunsListResponse

list_models(*, limit=20, offset=0)

Every model tracked in this data product, with its latest run

ModelsListResponse

Cheat sheet

I want to...
Call this

Connect

VulcanClient(fqdn=..., dp_name=..., access_token=..., tenant=...)

See available models and columns

client.metadata.get_semantic()

Run a query (measures/dimensions)

client.query.submit_semantic_rest(query={...})

Run a query (SQL)

client.query.submit_semantic_sql("SELECT ...")

Run raw SQL (physical tables)

client.query.submit_statement("SELECT ...")

Get the generated warehouse SQL only

Check if a query is done

client.query.get_statement(id)

Get query results

client.query.get_statement_result(id)

Query a named metric

client.query.get_metric(name, **filters)

Query a metric with filters

client.query.post_metric(name, body={...})

Save a query for reuse

client.perspectives.create(slug, PerspectiveCreateRequest(...))

Fetch a saved view

client.perspectives.get_result(slug)

Download Power BI / Tableau files

client.metadata.download_powerbi() / download_tableau()

Check data quality

client.dq.get_summary()

See recent pipeline runs

client.activity.list_runs()

Follow a data product

client.followers.follow()

See notifications

client.notifications.list()

Constructor Options

Parameter
Type
Required
Description

fqdn

str

Yes

DataOS FQDN, e.g. "example.dataos.io"

dp_name

str

Yes

Data product name, e.g. "clothing_retail"

access_token

str

Yes

DataOS API token

tenant

str

Yes

Tenant name, e.g. "public"

timeout

float

No

Request timeout in seconds (default 30.0)

verify_ssl

bool

No

Verify TLS certificates (default True)

Response Models

All methods return typed Pydantic v2 models with full IDE autocomplete. Extra fields from the API are preserved via extra="allow".

Client
Key Models

metadata

MetadataResponse, SemanticSchema

activity

Plan (key: plan_id), PlansListResponse, Run (key: run_id), RunsListResponse, ModelsListResponse

dq

DQSummary, RulesResponse, RuleDetailResponse

quality

ChecksListResponse, CheckDetailResponse

query

StatementAccepted (key: id), StatementDetail, StatementResult, UsageMetrics

perspectives

PerspectiveDetail, PerspectivesListResponse (items via .items)

notifications

NotificationsListResponse, Notification

followers

FollowStatus, FollowersListResponse, FollowerAnalytics

Last updated

Was this helpful?