Project
- class perses_api.project.Project[source]
Bases:
objectThe class includes all necessary methods to access the Perses projects API
- Parameters:
perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information
- create_project(project: Project) dict[source]
The method includes a functionality to create a new project
- delete_project(name: str) None[source]
The method includes a functionality to delete a project by name
- Parameters:
name (str) – Specify the name of the project to delete
- Raises:
ValueError – Missed specifying a necessary value
- get_project(name: str) dict[source]
The method includes a functionality to retrieve a single project by name
- Parameters:
name (str) – Specify the name of the project to retrieve
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The project dict
- Return type:
- get_projects(name: str = None) list[source]
The method includes a functionality to retrieve all projects
- update_project(name: str, project: Project) dict[source]
The method includes a functionality to update an existing project by name
- Parameters:
- Raises:
ValueError – Missed specifying a necessary value
Exception – Unspecified error by executing the API call
- Returns:
The updated project dict
- Return type: