LogStream Objects

class LogStream(LogStreamResponse)
Log streams are used to organize logs within a project on the Galileo platform. They provide a way to categorize and group related logs, making it easier to analyze and monitor specific parts of your application or different environments (e.g., production, staging, development). Arguments:
  • created_at (datetime.datetime): The timestamp when the log stream was created.
  • created_by (str): The identifier of the user who created the log stream.
  • id (str): The unique identifier of the log stream.
  • name (str): The name of the log stream.
  • project_id (str): The ID of the project this log stream belongs to.
  • datetime.datetime0 (datetime.datetime): The timestamp when the log stream was last updated.
  • datetime.datetime2 (datetime.datetime3): Additional properties associated with the log stream.

LogStreams Objects

class LogStreams(BaseClientModel, DecorateAllMethods)

list

def list(*,
         project_id: Optional[str] = None,
         project_name: Optional[str] = None) -> builtins.list[LogStream]
Lists all log streams. Exactly one of project_id or project_name must be provided. Arguments:
  • project_id (Optional[str]): The ID of the project to list log streams for.
  • project_name (Optional[str]): The name of the project to list log streams for.
Raises:
  • ValueError: If neither or both project_id and project_name are provided.
  • errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • project_name0: If the request takes longer than Client.timeout.
Returns: project_name1: A list of log streams.

get

def get(*,
        id: Optional[str] = None,
        name: Optional[str] = None,
        project_id: Optional[str] = None,
        project_name: Optional[str] = None) -> Optional[LogStream]
Retrieves a log stream by id or name. Arguments:
  • id (Optional[str]): The id of the log stream. Defaults to None.
  • name (Optional[str]): The name of the log stream. Defaults to None.
  • project_id (Optional[str]): The ID of the project. Defaults to None.
  • project_name (Optional[str]): The name of the project. Defaults to None.
Raises:
  • ValueError: If neither or both id and name are provided, or if neither or both project_id and project_name are provided.
  • Optional[str]3: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • Optional[str]4: If the request takes longer than Client.timeout.
Returns: Optional[str]5: The log stream if found, None otherwise.

create

def create(name: str,
           *,
           project_id: Optional[str] = None,
           project_name: Optional[str] = None) -> LogStream
Creates a new log stream. Exactly one of project_id or project_name must be provided. Arguments:
  • name (str): The name of the log stream.
  • project_id (Optional[str]): The ID of the project to create the log stream in. Defaults to None.
  • project_name (Optional[str]): The name of the project to create the log stream in. Defaults to None.
Raises:
  • ValueError: If neither or both project_id and project_name are provided, or if the project is not found.
  • project_name1: If the server validation fails.
  • project_name2: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • project_name3: If the request takes longer than Client.timeout.
Returns: project_name4: The created log stream.

get_log_stream

def get_log_stream(*,
                   name: Optional[str] = None,
                   project_id: Optional[str] = None,
                   project_name: Optional[str] = None) -> Optional[LogStream]
Retrieves a log stream by name. Exactly one of project_id or project_name must be provided. Arguments:
  • name (Optional[str]): The name of the log stream. Defaults to None.
  • project_id (Optional[str]): The ID of the project. Defaults to None.
  • project_name (Optional[str]): The name of the project. Defaults to None.
Raises:
  • ValueError: If neither or both project_id and project_name are provided.
  • project_name1: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
  • project_name2: If the request takes longer than Client.timeout.
Returns: project_name3: The log stream if found, None otherwise.

list_log_streams

def list_log_streams(*,
                     project_id: Optional[str] = None,
                     project_name: Optional[str] = None) -> list[LogStream]
Lists all log streams. Exactly one of project_id or project_name must be provided. Arguments:
  • project_id (str): The id of the project.
  • project_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: list[LogStream]: A list of Log streams.

create_log_stream

def create_log_stream(name: str,
                      project_id: Optional[str] = None,
                      project_name: Optional[str] = None) -> LogStream
Creates a new log stream. Exactly one of project_id or project_name must be provided. Arguments:
  • name (str): The name of the log stream.
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: LogStream: The created project.