Collaborator
Immutable representation of a user’s collaboration on a project. A Collaborator binds a user to a project with a specific role and permissions. Collaborators are contextual - the same user can have different roles on different projects. Collaborator attributes are immutable. To modify the role, use the update() method which returns a new Collaborator instance. To remove access, use remove(). ExamplesGet collaborators for a project
project = Project.get(name=“My Project”) collaborators = project.collaborators for collab in collaborators: print(f” - “)Check if a specific user has access
viewer = next((c for c in collaborators if c.email == “viewer@example.com”), None) if viewer: print(f”User has access”)Filter by role using the CollaboratorRole enum
from galileo import CollaboratorRole editors = [c for c in collaborators if c.role == CollaboratorRole.EDITOR]Update a collaborator’s role directly on the object
updated_collab = collab.update(role=CollaboratorRole.EDITOR)Remove a collaborator
collab.remove()created_at
first_name
id
last_name
permissions
project_id
remove
Remove a collaborator
collab = project.collaborators[0] collab.remove()role
to_dict
Returns
dict: Dictionary with collaborator properties.update
role: The new role to assign (CollaboratorRole enum).