sasvi: an easy-to-use SDK for SAS Visual Investigator
Overview
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. Covered
today: documents and entities, alerts, search, workflows, attachments, workspaces, insight sheets,
reference lists, custom endpoints, indexing, and solution configuration.
The SAS Visual Investigator REST API is powerful but schema-driven. Callers assemble payload
shapes instead of calling a method named after the task. sasvi wraps the common tasks in named
methods and keeps the raw endpoint layer available for everything else.
What you can do
The main handwritten domains are:
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, workflows, queues, and other solution configuration, and move a whole solution between tenants withsvi.admin.config.
API layers
SVIClient exposes both the raw generated layer and the stable handwritten layer.
Raw generated layer
Use this for direct, service-shaped coverage of the published OpenAPI definitions:
svi.api.alertssvi.api.datahubsvi.api.sandsvi.api.workflowssvi.api.filessvi.api.folderssvi.api.transport
Handwritten capability layer
Use this for bound objects and task-shaped methods:
svi.adminsvi.documentssvi.alertssvi.searchsvi.workflows
Architecture
At a high level, sasvi has three layers:
- Client foundation. Auth, connection setup, retry-aware HTTP clients, and generated service clients.
- Capability layer. The handwritten public domains such as
documents,alerts,search,workflows, andadmin. - Runtime and model layer. Bound handles, typed helpers, and normalization logic that make SAS Visual Investigator payloads behave consistently in Python.
flowchart TD
app["Application code"] --> client["Client foundation<br/>SVIClient, auth providers, generated clients"]
client --> domains["Capability layer<br/>documents, alerts, search, workflows, admin"]
domains --> runtime["Runtime and model layer<br/>bound handles, typed helpers, payload normalization"]
runtime --> generated["Generated API layer<br/>schema-driven clients and models"]
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.1.0 |
2026.10 | None yet | Initial version, live-verified on Stable 2026.10, Python 3.11 to 3.14 |
Full matrix:
Installation
Install from PyPI:
pip install --upgrade pip
pip install sasvi
For the command-line interface too, install sasvi[cli].
Supported Python versions for this release: 3.11, 3.12, 3.13, and 3.14.
To install the current main instead, pick the form that matches how you authenticate to GitHub.
HTTPS
pip install "git+https://github.com/sassoftware/SASVI.git"
SSH Keys
pip install "git+ssh://git@github.com/sassoftware/SASVI.git"
To check which one your git uses by default, run:
git remote -v
Output:
git@github.com:... → using SSH
https://github.com/... → using HTTPS
GitHub documents both:
Or install from a local copy of the repository:
python -m pip install .
More about installation
Pin a branch, tag, or commit when needed:
python -m pip install "git+https://github.com/sassoftware/SASVI.git@main"
Development install
uv venv .venv
uv pip install --python .venv/bin/python -e '.[dev]'
For optional performance benchmarking:
uv pip install --python .venv/bin/python -e '.[dev,perf]'
Installing into the SAS Viya Python (sas-pyconfig)
To make sasvi importable from PROC PYTHON, SAS Studio Python steps, and SAS
Intelligent Decisioning, add it to the package list that SAS Configurator for
Open Source installs. The build image has no git, so reference the
source archive URL for a pinned commit rather than a git+https://
requirement, and make the change durable in site-config rather than in the
live ConfigMap.
Full walkthrough:
website/docs/Guides/sas-viya-python.md.
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
Notebook examples live in examples/:
examples/documents_examples.ipynbexamples/insights_examples.ipynbexamples/workspaces_examples.ipynbexamples/alerts_examples.ipynbexamples/admin_examples.ipynbexamples/bulk_examples.ipynbexamples/custom_endpoints/custom_endpoints_cascading_data.ipynbexamples/custom_endpoints/custom_endpoints_entity_fields.ipynbexamples/search_examples.ipynbexamples/workflows_examples.ipynb
The companion docs page is website/docs/Guides/examples.md.
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
The canonical long-form docs live in website/docs/ and are rendered by the
Docusaurus site in website/.
Start here:
website/docs/index.mdwebsite/docs/before-you-start.mdwebsite/docs/quickstart.mdwebsite/docs/Guides/index.mdwebsite/docs/api/index.md
Useful concept docs:
-
CHANGELOG.mdfor the changes in each release. -
SAS Visual Investigator REST APIs on developer.sas.com.
Metadata
Release files for sasvi 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| sasvi-0.1.0.tar.gz | 1.4 MB | With provenance | Details for sasvi-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sasvi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sasvi-0.1.0-py3-none-any.whl |
Total release size: 4.3 MB
Release files / sasvi-0.1.0.tar.gz
| Download URL | sasvi-0.1.0.tar.gz |
|---|---|
| Size | 1.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d26cca8741391b5deb13b9c8c4b2c577ae9590682346b40a83ad87a6e2861934
|
|
BLAKE2b-256 checksum How to use checksums |
007eb0d01f58fc1e879c78577255d9007dd160ece4f511b0fa7726128da8f265
|
| 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 Nov 30, 2026.
Transparency logRelease files / sasvi-0.1.0-py3-none-any.whl
| Download URL | sasvi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f86f4189d2deb14d4032f0be65d884f3023886a4259ac227b1947256fe50af3
|
|
BLAKE2b-256 checksum How to use checksums |
6662c01dde5eb0ab55ef35aa2cd1fb0258da5714e7363db5f27d843540766006
|
| 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 Nov 30, 2026.
Transparency logSecurity for sasvi 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
Both files in this release have been uploaded with provenance metadata.
Attestation for sasvi-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 Nov 30, 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.