Skip to content

Manage Projects with the VB-OS Python SDK

The client.projects namespace manages projects and their member assignments.

Method Signature Description
list (*, limit=20, cursor=None) List all projects
create (**kwargs) Create a new project
get (project_id) Get project details
update (project_id, **kwargs) Update a project
archive (project_id) Archive a project
delete (project_id) Permanently delete a project
list_members (project_id, *, limit=20, cursor=None) List project members
add_member (project_id, **kwargs) Add a member to the project
remove_member (project_id, assignment_id) Remove a member
update_member (project_id, assignment_id, **kwargs) Update a member’s role
from vbos import VBOSClient
with VBOSClient(api_key="vbos_your_key_here") as client:
projects = client.projects.list()
for project in projects["items"]:
print(project["id"], project["name"])
projects = client.projects.list(limit=10)
while projects.get("cursor"):
projects = client.projects.list(limit=10, cursor=projects["cursor"])
project = client.projects.create(
name="Healthcare Onboarding",
workspace_id="ws_abc123",
)
print(project["id"])
project = client.projects.get(project_id="proj_abc123")
print(project["name"])
print(project["status"])
client.projects.update(
project_id="proj_abc123",
name="Healthcare Onboarding v2",
)

Archiving soft-disables a project. Archived projects can be restored.

client.projects.archive(project_id="proj_abc123")

Permanently removes a project and all associated resources.

client.projects.delete(project_id="proj_abc123")
members = client.projects.list_members(project_id="proj_abc123")
for member in members["items"]:
print(member["user_id"], member["role"])
assignment = client.projects.add_member(
project_id="proj_abc123",
user_id="usr_def456",
role="EDITOR",
)
print(assignment["id"])
client.projects.update_member(
project_id="proj_abc123",
assignment_id="asgn_ghi789",
role="VIEWER",
)
client.projects.remove_member(
project_id="proj_abc123",
assignment_id="asgn_ghi789",
)