LEIP Enterprise

class le.App(*, id: Optional[str] = None, name: Optional[str] = None, version: Optional[str] = None, container_version: Optional[str] = None, org_name: str = 'Latent AI', org_url: str = 'https://latentai.com/')

Application metadata for events.

Parameters
  • id (Optional[str]) –

  • name (Optional[str]) –

  • version (Optional[str]) –

  • container_version (Optional[str]) –

  • org_name (str) –

  • org_url (str) –

Return type

None

container_version: Optional[str]

Version of the running container, if applicable.

id: Optional[str]

ID of the application.

name: Optional[str]

Name of the application.

org_name

Name of the organization that maintains the application.

org_url

URL of the organization that maintains the application.

version: Optional[str]

Version of the application.

le.check_connection() None

Checks connection to the LEIP Analytics API server based on the current session host.

Raises

UserError – If a connection could not be made.

Return type

None

le.create_project(name: str) dict

Creates a new project in the LEIP Analytics API server based on the current session host.

Parameters

name (str) – The name for the new project.

Returns

The JSON response from the API server.

Return type

dict

Raises
  • UserError – If the session is invalid or if the API server rejects the request with a known issue.

  • RuntimeError – If an unexpected error occurs.

le.get_current_user() dict

Gets the current user logged into the LEIP Analytics API server based on the current session host.

Returns

The JSON response from the API server.

Return type

dict

Raises
  • UserError – If the session is invalid or if the API server rejects the request with a known issue.

  • RuntimeError – If an unexpected error occurs.

le.get_project(project_id: str) dict

Gets a project from the LEIP Analytics API server based on the current session host.

Parameters

project_id (str) – The UUID of the desired project.

Returns

The JSON response from the API server.

Return type

dict

Raises
  • UserError – If the session is invalid or if the API server rejects the request with a known issue.

  • RuntimeError – If an unexpected error occurs.

le.get_projects() dict

Gets all the projects visible by the current user from the LEIP Analytics API server based on the current session host.

Returns

The JSON response from the API server.

Return type

dict

Raises
  • UserError – If the session is invalid or if the API server rejects the request with a known issue.

  • RuntimeError – If an unexpected error occurs.

le.login(username: str, password: str) dict

Logs in to the LEIP Analytics API server based on the current session host.

Parameters
  • username (str) – Login name of the user.

  • password (str) – Password of the user.

Returns

The JSON response from the API server.

Return type

dict

Raises
  • UserError – If the session is invalid or if the API server rejects the request with a known issue.

  • RuntimeError – If an unexpected error occurs.