drc-vantage 2.0
Thin HTTP client for the Vantage platform. Talks only to the Next.js API (VANTAGE_API_URL) with a developer account API key.
Install
pip install drc-vantage
# or
uv add drc-vantage
Configuration
| Variable | Description | Example |
|---|---|---|
VANTAGE_API_URL |
Next.js API base (includes /api) |
http://localhost:3000/api |
VANTAGE_API_KEY |
Developer account API key | vantage_… |
Quick start (Client-centric)
from vantage import Client
client = Client()
# KPI: create → chain governance on the same handle
my_kpi = client.kpis.create(
name="Monthly revenue",
dataset_id="…",
definition_type="MANUAL",
manual_config={"valueField": "amount", "aggregation": "SUM"},
)
my_kpi.assign_to_team("analytics")
my_kpi.assign_owner("owner@example.com")
# Lookup
record = client.kpis.find_by_name("Monthly revenue")
existing = client.kpis.for_id(record.id)
# Dataset
dataset = client.datasets.register(
location={"schema": "marts", "table": "nps"},
name="NPS",
type="TABLE",
storage_system_slug="postgresql",
)
dataset.assign_to_team("customer-success")
dataset.analyze_and_check_alerts()
# Ingestion
client.ingestion.storage_systems.register(
slug="wh-pg",
env_key="DRC_PG",
name="Warehouse PostgreSQL",
kind="POSTGRESQL",
config={"database": "analytics"},
)
# Platform admin
client.platform.teams.create(name="Analytics")
Public exports
Client, catalogue exceptions (NotFoundError, AmbiguousLookupError), Page, and orchestration helpers (vantage_flow, orchestration_hooks, …).
Resource types and records: from vantage.resources import KpiResource or from vantage.catalogue import KpiRecord.
Migration from 1.x
| 1.x | 2.0 |
|---|---|
from vantage import KPI, Dataset, … |
from vantage import Client only |
KPI(client=…, …).create() |
client.kpis.create(…) → returns handle |
KPI.for_id(client, id) |
client.kpis.for_id(id) |
DataStorageSystem(…).register() |
client.ingestion.storage_systems.register(…) |
Team(…).create() |
client.platform.teams.create(…) |
client.kpis was read-only |
client.kpis = read + write |
Orchestration
See previous examples using vantage_flow, orchestration_hooks, and client.ingestion.data_sources.register inside Prefect flows.
Release files for drc-vantage 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drc_vantage-1.6.0.tar.gz | 29.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drc_vantage-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.6 kB
Release files / drc_vantage-1.6.0.tar.gz
| Download URL | drc_vantage-1.6.0.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f03dde7da47737f571513804cb547347cd64ebb2a80f0bedb39e6436aad6671e
|
|
BLAKE2b-256 checksum How to use checksums |
f52ed6b9bad7b2e4fe7fc95eb48078bc4af2ba63e3152b4eb4ec1904ab2a6293
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / drc_vantage-1.6.0-py3-none-any.whl
| Download URL | drc_vantage-1.6.0-py3-none-any.whl |
|---|---|
| Size | 45.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87222c9c63cbf63fed0c2dce9d54d4765827cf74db6f1a99a39563ac77c39f80
|
|
BLAKE2b-256 checksum How to use checksums |
0c484aa36869a1f48fdc4a3afca14dd515654f7a22e6034f5ad777c5b3dec99c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|