Workspace and Projects
Overview
Quick Start
from viewai_client import ViewAIClient
# Initialize client
client = ViewAIClient(api_key="your-api-key")
# List workspaces
workspaces = client.list_accessible_workspaces()
for ws in workspaces:
print(f"{ws.workspace_name}: {ws.workspace_id}")
# Get default workspace
workspace = client.retrieve_default_workspace()
# Set current workspace
client.set_current_workspace(workspace)
# List projects in workspace
projects = client.list_accessible_projects(workspace_id=workspace.workspace_id)
for proj in projects:
print(f"{proj.project_name}: {proj.project_id}")Understanding Workspaces
What is a Workspace?
Common Workspace Patterns
Workspace Attributes
Understanding Projects
What is a Project?
Common Project Patterns
Project Attributes
Managing Workspaces
Listing Workspaces
Getting Default Workspace
Finding Workspaces by Name
Finding Workspaces by ID
Checking Workspace Existence
Counting Workspaces
Workspace Discovery Pattern
Managing Projects
Listing Projects
Finding Projects by Name
Finding Projects by ID
Checking Project Existence
Counting Projects
Searching Projects
Project Discovery Pattern
Context Management
Setting Current Workspace
Setting Current Project
Context Initialization
Context Switching Pattern
Organizing Models
Training Models in Workspace
Training Models in Project
Deploying Models in Workspace
Deploying Models in Project
Multi-Environment Deployment
Project-Based Model Organization
Best Practices
See Also
Was this helpful?