LEIP Enterprise

class le.App(*, id: str = None, name: str = None, version: str = None, container_version: 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 Enterprise 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 Enterprise 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 Enterprise 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 Enterprise 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 Enterprise 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 Enterprise 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.