Usecase¶
-
class
previsionio.usecase.
Usecase
(**usecase_info)¶ Bases:
previsionio.api_resource.ApiResource
A Usecase
Parameters: -
delete
()¶ Delete a usecase from the actual [client] workspace.
Returns: Deletion process results Return type: dict
-
classmethod
from_id
(_id: str) → previsionio.usecase.Usecase¶ Get a usecase from the platform by its unique id.
Parameters: _id (str) – Unique id of the usecase version to retrieve Returns: Fetched usecase Return type: BaseUsecaseVersion
Raises: PrevisionException
– Any error while fetching data from the platform or parsing result
-
classmethod
list
(project_id: str, all: bool = True) → List[previsionio.usecase.Usecase]¶ List all the available usecase in the current active [client] workspace.
Warning
Contrary to the parent
list()
function, this method returns actualUsecase
objects rather than plain dictionaries with the corresponding data.Parameters: all (boolean, optional) – Whether to force the SDK to load all items of the given type (by calling the paginated API several times). Else, the query will only return the first page of result. Returns: Fetched dataset objects Return type: list( Usecase
)
-