Skip to main content

sasvi: an easy-to-use SDK for SAS Visual Investigator

sasvi is a Python SDK for SAS Visual Investigator. It gives you task-oriented methods for the common work of an investigation, plus raw wrappers over the REST API for everything else.

pip install sasvi

Needs Python 3.11 or later. More install options · Documentation

Overview

Covered today: entities, alerts, search, workflows, attachments, workspaces, insight pages, reference lists, custom endpoints, indexing, and solution configuration.

What you can do

Start with the task-oriented services:

  • svi.documents. Read and update documents, attachments, child documents, workspaces, and insight sheets.
  • svi.alerts. Work with alerts as first-class objects and combine alert APIs with Data Hub-backed document updates.
  • svi.search. Search SAND with a more Pythonic query layer and use results as references in later operations.
  • svi.workflows. Start processes, inspect tasks, claim or release work, complete actions, and work with bound workflow instances.
  • svi.admin. Inspect and update entity metadata, reference lists, relationship types, queues, and other solution configuration, and move a whole solution between tenants with svi.admin.config.
  • svi.custom. Call your own endpoints on the same host with the client's sign-in.

For an endpoint they do not cover, use the raw layer. svi.api has one method per published operation of the alerts, datahub, sand, workflows, files, folders and transport APIs. See SVIClient and API layers.

Architecture

Your code calls SVIClient. It offers task-oriented services and a raw API layer. Both use the generated clients, which call the SAS Visual Investigator REST APIs.

More detail: Runtime architecture.

Prerequisites

  • Python 3.11, 3.12, 3.13, or 3.14.
  • A SAS Viya environment with SAS Visual Investigator, and an account that can sign in to it.

Compatibility

SAS Viya Stable releases ship monthly and LTS releases ship every 6 months. sasvi compatibility is determined by the API versions of the endpoints it calls. For the SAS APIs themselves, see developer.sas.com.

To find the SAS Viya version you are on, run %put &=SYSVIYAVERSION; in a SAS session. See Find your SAS Viya version. To see what your installed sasvi was built against, run sasvi version or call sasvi.compatibility().

sasvi package version Viya Stable Viya LTS Notes
0.2.0 2026.10 None yet Live-verified on Stable 2026.10, Python 3.11 to 3.14
0.1.0 2026.10 None yet Initial version, live-verified on Stable 2026.10, Python 3.11 to 3.14

See the full matrix.

Installation

Install sasvi from PyPI:

pip install sasvi

To get the sasvi command as well, install the cli extra:

pip install "sasvi[cli]"

In a project you deploy, pin the minor release:

pip install "sasvi~=0.2.0"

To use sasvi from PROC PYTHON, SAS Studio or SAS Intelligent Decisioning, see Installing sasvi into the SAS Viya Python.

Getting Started

Create a client:

from sasvi import SVIClient
from sasvi.auth import AuthorizationCodeTokenProvider

svi = SVIClient(
    base_url="https://viya.example.com",
    auth=AuthorizationCodeTokenProvider(open_browser=True),
)

svi.verify_connection()

The authentication guide covers the other providers.

Use the handwritten capability layer for task-oriented workflows:

# list alerts
alerts = svi.alerts.list(limit=5)

# take the first one
alert = alerts[0]

# read a property
alert.current_score

# add a comment
alert.comments.create(text="Test comment from sasvi.")

Use the raw generated layer when you want direct endpoint access:

workflows = svi.api.workflows.get_workflows()
types = svi.api.sand.get_types(names_only=True)

Examples

Ten example notebooks cover documents, insights, workspaces, alerts, search, workflows, bulk work, administration and custom endpoints. The examples guide says what each one does, and the recipes are shorter.

Troubleshooting

The troubleshooting guide maps each error to its cause and fix. The FAQ covers the questions that come up most often.

Contributing

Maintainers are accepting patches and contributions to this project. Please read CONTRIBUTING.md for details about submitting contributions to this project.

To report a security issue, follow the security policy. For help using the project, see SUPPORT.md.

License

This project is licensed under the Apache 2.0 License.

Third-Party Dependencies

This project requires the following dependencies.

Dependency License
attrs MIT
httpx2 BSD 3-Clause
pydantic MIT

The optional command-line interface (pip install "sasvi[cli]") adds the following dependencies.

Dependency License
typer MIT
click BSD 3-Clause
rich MIT

Additional Resources

Metadata

Release files for sasvi 0.2.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 sasvi 0.2.0
File Size Uploaded Provenance Actions
sasvi-0.2.0.tar.gz 1.4 MB With provenance Details for sasvi-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 4.3 MB

Release files / sasvi-0.2.0.tar.gz

Download URL sasvi-0.2.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
e90f2820cae134d304d7c2c5e888f15d440f9bbd636c770e7f69e94f4e7cf9d0
BLAKE2b-256 checksum
How to use checksums
c503aef4559aea7ab8b9221c461ba1353181bc4939b74563f74e870a8801f302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / sasvi-0.2.0-py3-none-any.whl

Download URL sasvi-0.2.0-py3-none-any.whl
Size 2.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5ab43513882976dfafba393b3ed904cf5ed1e01d7fdc78f779d6ad6b1e250040
BLAKE2b-256 checksum
How to use checksums
9d8e7680f7b0aa3b0ea0511a3b927139a00261875dea3d368cf06422bdf65a5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Security for sasvi 0.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sasvi-0.2.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 Dec 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.

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