Python SDK

The local Python SDK package is named credvault-edge and is version 1.0.0. It exposes a CredVault client for Python services, scripts, notebooks, and automation across the core CredVault APIs plus orchestration, lineage, metadata, notebooks, pipelines, dashboards, alerts, realtime streams, and agent sessions.

Installation

Install from the local wheel or source archive provided by CredVault:

Terminal
pip install ./credvault_edge-1.0.0-py3-none-any.whl
What you should seeA completed package install with no dependency errors.

What you should see: pip should install credvault-edge into your current Python environment. After that, from credvault import CredVault should work.

or:

Terminal
pip install ./credvault_edge-1.0.0.tar.gz
What you should seeA completed package install with no dependency errors.

Use the local package file unless your organization has published credvault-edge to PyPI or a private Python package registry. The separate credvault-cie package is CIE tooling, not the full Python application SDK.

Connecting to CredVault

The SDK defaults to http://localhost:5000/api, which is only for local backend development. Production code must pass the CredVault backend API URL.

Python
import os
from credvault import CredVault

client = CredVault(
    api_key=os.environ["CREDVAULT_API_KEY"],
    base_url="https://<your-credvault-backend>/api",
)

customers = client.data.query("customers", {"status": "active"})
print(customers)

What you should see: a Python dictionary or list containing records returned by CredVault. If the API key is wrong, the SDK should raise a clear authentication error.

Use API keys for server-to-server data routes such as /api/v1/data. Use user tokens for routes that act like the dashboard, including clusters, functions, webhooks, logs, settings, and API-key management.

Working with Data

The data resource supports cluster and collection operations.

Python
customers = client.data.query("customers", {"status": "active"})

created = client.data.insert("customers", {
    "name": "Acme Ltd",
    "status": "active",
})

What you should see: the query returns matching records, and the insert call returns the created document or document ID.

Check /api-docs on the backend for the exact request body accepted by each endpoint.

CIE

The CIE resource supports Intelligence Engine actions such as datasets, model training, and predictions.

Python
models = client.cie.list_models()

prediction = client.cie.predict("model-id", {
    "amount": 1200,
    "region": "emea",
})

For command-line data work, users can also use the cie CLI.

Available Resources

  • auth for sign-in, sign-up, and profile calls
  • data for clusters and collection data
  • cie for datasets, models, and predictions
  • webhooks for event delivery
  • functions for serverless functions
  • triggers for collection events
  • backups for backup and restore
  • schema for schema and indexes
  • api_keys for API key management
  • metrics for platform monitoring
  • logs for activity and audit logs
  • notifications for notifications; preference methods should be checked against /api-docs
  • settings for account settings, but some methods still need backend route alignment
  • robots for robot/device endpoints, but this area still needs route alignment before it is public-ready
  • orchestration for jobs, runs, assets, sensors, schedules, and launching jobs
  • lineage for namespaces, datasets, jobs, runs, versions, search, and lineage
  • metadata for tables, databases, search, and lineage
  • notebooks for notebook operations and code execution
  • pipelines for creating, running, and inspecting pipelines
  • dashboards and alerts for operational monitoring
  • realtime for stream management and WebSocket stream URLs
  • agent_sessions for authenticated agent session and event calls

Platform Integrations

Python
jobs = client.orchestration.list_jobs()
client.orchestration.run_job("daily_customer_refresh")

lineage = client.lineage.get_lineage(
    node_id="dataset:customers",
    depth=3,
    direction="DOWNSTREAM",
)

metadata = client.metadata.search("customers")

pipeline_run = client.pipelines.run("pipeline-id")
dashboard_data = client.dashboards.data("dashboard-id")

client.alerts.record_metric("alert-id", 92.5)

What you should see: each method returns the CredVault result for that resource, such as jobs, lineage, metadata matches, pipeline run status, dashboard data, or metric confirmation.

Security

Keep API keys in environment variables:

Terminal
export CREDVAULT_API_KEY="..."

Do not store API keys in notebooks that will be shared or committed into source control.