Skip to main content

Vectora Python SDK

Vectora helps you monitor sklearn models in production without adding latency to your prediction path.

The SDK captures:

  • prediction metrics like accuracy, F1, precision, and recall
  • feature distribution summaries for drift detection
  • SHAP-based feature importance when shap is available
  • trace IDs that connect predictions back to the Vectora dashboard

Install

pip install vectora

Quickstart

from vectora import VectoraClient
from vectora.models import SklearnConnector

client = VectoraClient(api_key="vct_live_xxx")
connector = SklearnConnector(
    client=client,
    model=your_sklearn_model,
    model_id="11111111-1111-1111-1111-111111111111",
)

predictions = connector.predict(X_test, y_true=y_test)

predict() returns the model's predictions immediately. Vectora sends the monitoring payload in a background thread so your production inference path stays fast.

What gets sent

Each prediction call sends a payload to /api/ingest/metrics with:

  • trace_id
  • model_id
  • metrics
  • feature_distributions
  • shap_values
  • sample_count
  • timestamp

If SHAP is not installed, the SDK logs a warning once and continues without SHAP values.

If the network call fails, the SDK logs the error to stderr and never raises it back to your prediction path.

API

VectoraClient

client = VectoraClient(
    api_key="vct_live_xxx",
    base_url="https://vectora.ai",
    timeout=5.0,
    max_retries=2,
)

SklearnConnector

connector = SklearnConnector(client, model_id="11111111-1111-1111-1111-111111111111", model=trained_model)
predictions = connector.predict(X, y_true=y_true)

Coming Soon

vectora.llm and vectora.agent are reserved for future releases and raise ComingSoonError when accessed.

Release

Tagging the repository with v* triggers the GitHub Actions publish workflow in .github/workflows/publish.yml.

git tag v0.1.0
git push origin v0.1.0

The workflow:

  • runs the SDK test suite
  • builds the source and wheel distributions
  • publishes to PyPI using GitHub Actions trusted publishing

Metadata

Release files for vectora 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vectora 0.1.0
File Size Uploaded Provenance
vectora-0.1.0.tar.gz 9.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vectora 0.1.0
File Interpreter ABI Platform
vectora-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.2 kB

Release files / vectora-0.1.0.tar.gz

Download URL vectora-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1d3d311f6b2a143d616d1f3c7f5a557e92c9e9bd3a22e6934b79bfe5ed0fc104
BLAKE2b-256 checksum
How to use checksums
75148a7aae51ef56117ad366090e533e5444f3f001216fdbabcefd3ea9796de9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

Release files / vectora-0.1.0-py3-none-any.whl

Download URL vectora-0.1.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc2e6109234808e90ae9fa1c82d2fea3dd6d8adea9269d647c6f99c1ff8dbe12
BLAKE2b-256 checksum
How to use checksums
d5c646f7f8e27479d53f19ff6598a2c199263183e373a83bfbcf6e26298a9671
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

Security for vectora 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vectora-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page