modelon.impact.client.operations.workspace package
Submodules
modelon.impact.client.operations.workspace.conversion module
- class WorkspaceConversionOperation(location, service, create_entity)
Bases:
AsyncOperation
[Entity
]An conversion operation class for the Workspace class.
- data()
Returns a Workspace class instance of the converted workspace.
- Return type:
TypeVar
(Entity
)- Returns:
A Workspace class instance.
- property id: str
Workspace conversion id.
- property name: str
Return the name of operation.
- property status: AsyncOperationStatus
Returns the conversion status as an enumeration.
- Returns:
The AsyncOperationStatus enum. The status can have the enum values AsyncOperationStatus.READY, AsyncOperationStatus.RUNNING or AsyncOperationStatus.ERROR
Example:
client.convert_workspace(workspace_id).status
modelon.impact.client.operations.workspace.exports module
- class Export(export_service, download_uri)
Bases:
object
- download_as(path_to_download)
Writes the binary archive to a file. Returns the path to downloaded archive.
- Parameters:
path_to_download (
str
) – The path to store the downloaded workspace.- Return type:
str
- Returns:
local path to the downloaded archive.
Example:
path = workspace.export().wait().download_as('/home/workspace.zip') path = workspace.export().wait().download_as('workspace.zip')
- property id: str
ID of the export.
- class WorkspaceExportOperation(location, service, create_entity)
Bases:
AsyncOperation
[Entity
]An export operation class for the Workspace class.
- data()
Returns a Export class instance.
- Return type:
TypeVar
(Entity
)- Returns:
An Export class instance.
- property id: str
Workspace export id.
- property name: str
Return the name of operation.
- property status: AsyncOperationStatus
Returns the upload status as an enumeration.
- Returns:
The AsyncOperationStatus enum. The status can have the enum values AsyncOperationStatus.READY, AsyncOperationStatus.RUNNING or AsyncOperationStatus.ERROR
Example:
workspace.download().status
modelon.impact.client.operations.workspace.imports module
- class WorkspaceImportOperation(location, service, create_entity)
Bases:
AsyncOperation
[Entity
]An import operation class for the Workspace class.
- data()
Returns a new Workspace class instance.
- Return type:
TypeVar
(Entity
)- Returns:
A Workspace class instance.
- property id: str
Workspace import id.
- property name: str
Return the name of operation.
- property status: AsyncOperationStatus
Returns the upload status as an enumeration.
- Returns:
The AsyncOperationStatus enum. The status can have the enum values AsyncOperationStatus.READY, AsyncOperationStatus.RUNNING or AsyncOperationStatus.ERROR
Example:
client.import_workspace_from_shared_definition(definition, False).status