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 withsvi.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
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.1 |
2026.10 | None yet | Notebook login fix, live-verified on Stable 2026.10, Python 3.11 to 3.14 |
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sasvi-0.2.1.tar.gz | 1.4 MB | With provenance | Details for sasvi-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sasvi-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for sasvi-0.2.1-py3-none-any.whl |
Total release size: 4.3 MB
Release files / sasvi-0.2.1.tar.gz
| Download URL | sasvi-0.2.1.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18311d4426bbfb131a26d974496c4ae3b4ab979041e64d64a8fd3959ea9cdbcf
|
|
BLAKE2b-256 checksum How to use checksums |
99b9d77b857fe0864b684552c0d0bfc69352e0974544abbc82abb001ea35c184
|
| 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 3, 2026.
Transparency logRelease files / sasvi-0.2.1-py3-none-any.whl
| Download URL | sasvi-0.2.1-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7660e254592372004e9663ff875bb27f2b61e1e9c949f22cb7677007749221fb
|
|
BLAKE2b-256 checksum How to use checksums |
6584ee907f7adb1bf98b80a72ca5980d8f0abba2588329854c511c5c7596d21c
|
| 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 3, 2026.
Transparency logSecurity for sasvi 0.2.1
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.
Attestation for sasvi-0.2.1.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 3, 2026.
Transparency logA 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.