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 sasviNeeds Python 3.11 or later. More install options · Documentation
Note
sasvi is in beta. Releases are numbered 0.x, and a minor release (0.1 to 0.2) may
change or remove public API. Every such change is listed in the
changelog.
Patch releases only fix bugs, so pin a minor release.
Please report what breaks or is missing through a
GitHub issue.
Covered today: entities, alerts, search, workflows, attachments, workspaces, insight pages, reference lists, custom endpoints, indexing, and solution configuration.
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.
More detail: Runtime architecture.
- 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.
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.
Install sasvi from PyPI:
pip install sasviTo 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.
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)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.
The troubleshooting guide maps each error to its cause and fix. The FAQ covers the questions that come up most often.
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.
This project is licensed under the Apache 2.0 License.
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 |