Documentation Index
Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
Use this file to discover all available pages before exploring further.
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().
Examples
# Get collaborators for a project
project = Project.get(name="My Project")
collaborators = project.collaborators
for collab in collaborators:
print(f"{collab.email} - {collab.role}")
# 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 {viewer.role} 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
def created_at(self) -> datetime | None
Get the creation timestamp.
email
def email(self) -> str | None
Get the user’s email address.
first_name
def first_name(self) -> str | None
Get the user’s first name.
Get the collaboration record ID.
last_name
def last_name(self) -> str | None
Get the user’s last name.
permissions
def permissions(self) -> list[Any] | None
Get the permissions for this collaboration.
Returns None if no permissions data is available (either omitted by
the API or explicitly empty). A non-empty list indicates specific
actions the API caller can perform on this collaborator record.
project_id
def project_id(self) -> str
Get the project ID.
remove
Remove this collaborator from the project.
Revokes the user’s access to the project. After calling this method,
the collaborator object should no longer be used.
Examples
# Remove a collaborator
collab = project.collaborators[0]
collab.remove()
role
def role(self) -> CollaboratorRole
Get the collaboration role.
to_dict
def to_dict(self) -> dict[str, Any]
Convert collaborator to dictionary representation.
Returns
dict: Dictionary with collaborator properties.
update
def update(self, role: CollaboratorRole) -> Collaborator
Update this collaborator’s role.
Creates a new Collaborator instance with the updated role. The original
instance remains unchanged (immutability is preserved).
Arguments
role: The new role to assign (CollaboratorRole enum).
user_id
Get the user ID.