Base API Resource¶
All resource objects you will be using in Prevision.io’s Python SDK inherit from this base parent class.
In the SDK, a resource is an object that can be fetched from the platform,
used in your code, updated, deleted… previsionio.usecase.BaseUsecase
,
previsionio.dataset.Dataset
and previsionio.model.Model
are
all resources.
-
class
previsionio.api_resource.
ApiResource
(**params)¶ Base parent class for all SDK resource objects.
-
delete
()¶ Delete a resource from the actual [client] workspace.
Raises: PrevisionException
– Any error while deleting data from the platform
-
update_status
(specific_url: str = None) → Dict¶ Get an update on the status of a resource.
Parameters: specific_url (str, optional) – Specific (already parametrized) url to fetch the resource from (otherwise the url is built from the resource type and unique _id
)Returns: Updated status info Return type: dict
-
-
class
previsionio.api_resource.
ApiResourceType
¶ All the different resource types and matching API endpoints.