Project
Object-centric interface for Galileo projects. This class provides an intuitive way to work with Galileo projects, encapsulating project management operations and providing seamless integration with log stream management. ExamplesCreate a new project locally, then persist
project = Project(name=“My AI Project”).create()Get an existing project
project = Project.get(name=“My AI Project”)List all projects
projects = Project.list()Create a log stream for the project
log_stream = project.create_log_stream(name=“Production Logs”)List log streams for the project
log_streams = project.list_log_streams()Access related resources via properties
for log_stream in project.logstreams: print(log_stream.name) for experiment in project.experiments: print(experiment.name) for dataset in project.datasets: print(dataset.name) for prompt in project.prompts: print(prompt.name)Or use the explicit list methods
datasets = project.list_datasets() prompts = project.list_prompts()Manage collaborators
for collab in project.collaborators: print(f”: “)Add a collaborator
project.add_collaborator(user_id=“user-123”, role=CollaboratorRole.EDITOR)Update a collaborator’s role
project.update_collaborator(user_id=“user-123”, role=CollaboratorRole.VIEWER)Remove a collaborator
project.remove_collaborator(user_id=“user-123”)Delete a project (WARNING: cannot be undone!)
old_project = Project.get(name=“Old Project”) old_project.delete()add_collaborator
user_id: The ID of the user to add as a collaborator.role: The role to assign. One of CollaboratorRole.OWNER, EDITOR, VIEWER, or ANNOTATOR. Defaults to VIEWER.
collaborators
Filter by role
editors = [c for c in project.collaborators if c.role == CollaboratorRole.EDITOR]Update or remove directly on the collaborator object
collab.update(role=CollaboratorRole.EDITOR) collab.remove()create
create_log_stream
name(str): The name of the log stream to create.
datasets
delete
Delete a project
project = Project.get(name=“Old Project”) project.delete() assert project.is_deleted()After deletion, the project no longer exists remotely
The local object is marked as DELETED
print(project.sync_state) # SyncState.DELETEDexperiments
get
id(Optional[str]): The project ID.name(Optional[str]): The project name.
list
Process each project
passlist_collaborators
list_datasets
Process each dataset
passlist_experiments
Process each experiment
passlist_log_streams
starting_token (from
next_starting_token on a prior response) to fetch subsequent pages.
Arguments
limit(Union[Unset, int]): Maximum number of log streams to return per page. Defaults to 100.starting_token(Union[Unset, int]): Pagination token to start from. Defaults to 0 (first page).
list_prompts
Process each prompt
passlogstreams
prompts
refresh
remove_collaborator
user_id: The ID of the user to remove.
save
ProjectUpdate also supports description, labels, and created_by,
but these are not exposed as tracked attributes on the domain object because the
read endpoints (get/list) do not return them consistently. created_by is
server-managed.
If the project is in FAILED_SYNC state (from a prior failed operation), this
method raises ValueError. Call :meth:refresh first to re-sync, then retry.
Examples
Create a new project
project = Project(name=“My Project”) project.save()Update an existing project’s name via dirty-tracking
project = Project.get(name=“My Project”) project.name = “Renamed Project” # automatically marks DIRTY project.save()update_collaborator
user_id: The ID of the user whose role to update.role: The new role to assign. One of CollaboratorRole.OWNER, EDITOR, VIEWER, or ANNOTATOR.