Client model
SVIClient exposes three layers on purpose.
The diagram shows the recommended dependency direction: your code talks to the stable entry points; those wrap the generated layer; the generated layer uses the internal runtime. Falling back to the lower layers is supported, just rarely needed.
1. Stable entry points
This is the layer most application code should start with. SVIClient mounts six
service attributes:
client.documentsclient.alertsclient.searchclient.workflowsclient.adminclient.custom
SVIClient also mounts client.api (the raw facades below), client.auth (the
token provider), and client.runtime_config (the resolved SVIConfig).
Two capabilities you might expect at the top level live one hop down instead.
Reference lists are part of the admin surface (client.admin.reference_lists),
and insights hang off a bound document (document.insights).
Why it exists:
- it gives you bound Python objects
- it hides transport details like patch payloads and client wiring
- it turns service operations into workflow-shaped methods
2. Raw generated layer
sasvi.api.<service> exposes the generated endpoints directly:
sasvi.api.alertssasvi.api.datahubsasvi.api.sandsasvi.api.workflowssasvi.api.filessasvi.api.folderssasvi.api.transport
Choose this layer when:
- you need an endpoint the handwritten layer does not wrap yet
- you want generated request and response models
- you are already thinking in SAS service operations
3. Internal runtime layer
The runtime and generated code under src/sasvi/_generated and related internal modules support
the public layers. They are public-by-package-layout, but not the main stability target for user
code.
Bound objects
Bound objects such as Document, Alert, WorkflowInstance, WorkflowTask, and ReferenceListRecord carry the
API context they need so your next call is attached to the object itself.
Why this matters:
alert.update_fields(...)reads like the business actiontask.claim()andtask.complete(...)stay attached to the same task- hydration from search results returns objects that are ready for follow-on work
Rule of thumb
- use
client.<capability>for workflow-oriented Python code - use
sasvi.api.<service>for breadth and transport-level control - drop to internal modules only when you are extending the SDK itself