Project Objects

class Project()

Represents a project in the Galileo platform.

Projects are containers for logs, traces, and other data in Galileo. All logs are stored within a project, and users can create and manage projects to organize their LLM usage data.

Arguments:

  • created_at (datetime.datetime): The timestamp when the project was created.
  • created_by (str): The identifier of the user who created the project.
  • id (str): The unique identifier of the project.
  • updated_at (datetime.datetime): The timestamp when the project was last updated.
  • bookmark (Union[Unset, bool]): Whether the project is bookmarked. Defaults to False.
  • datetime.datetime0 (datetime.datetime1): The name of the project.
  • datetime.datetime2 (datetime.datetime3): The permissions associated with the project.
  • datetime.datetime4 (datetime.datetime5): The type of the project, typically GEN_AI.

Projects Objects

class Projects(BaseClientModel, DecorateAllMethods)

list

def list() -> list[Project]

Lists all projects.

Raises:

  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:

list[Project]: A list of projects.

get

def get(*,
        id: Optional[str] = None,
        name: Optional[str] = None) -> Optional[Project]

Retrieves a project by id or name (exactly one of id or name must be provided).

Arguments:

  • id (str): The id of the project.
  • name (str): The name of the project.

Raises:

  • ValueError: If neither or both id and name are provided.
  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • name0: If the request takes longer than Client.timeout.

Returns:

name1: The project.

create

def create(name: str) -> Project

Creates a new project.

Arguments:

  • name (str): The name of the project.

Raises:

  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:

Project: The created project.

get_project

def get_project(*,
                id: Optional[str] = None,
                name: Optional[str] = None) -> Optional[Project]

Retrieves a project by id or name (exactly one of id or name must be provided).

Arguments:

  • id (str): The id of the project.
  • name (str): The name of the project.
  • with_content (bool): Whether to return the content of the project. Default is False.

Raises:

  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:

name0: The project.

list_projects

def list_projects() -> list[Project]

Lists all projects.

Arguments:

  • limit (Union[Unset, int]): The maximum number of projects to return. Default is 100.

Raises:

  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:

list[Project]: A list of projects.

create_project

def create_project(name: str) -> Project

Creates a new project.

Arguments:

  • name (str): The name of the project.
  • type_ (ProjectType): The type of the project.

Raises:

  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • httpx.TimeoutException: If the request takes longer than Client.timeout.

Returns:

Project: The created project.