modelon.impact.client.sal package
Submodules
modelon.impact.client.sal.context module
Context class.
- class Context
Bases:
object
modelon.impact.client.sal.custom_function module
Custom function service module.
- class CustomFunctionService(uri, http_client)
Bases:
object
- custom_function_default_options_get(workspace_id, custom_function)
- Return type:
Dict
[str
,Any
]
- custom_function_get(workspace_id, custom_function)
- Return type:
Dict
[str
,Any
]
- custom_function_options_get(workspace_id, custom_function)
- Return type:
Dict
[str
,Any
]
- custom_functions_get(workspace_id)
- Return type:
Dict
[str
,Any
]
modelon.impact.client.sal.exceptions module
Service access layer exceptions.
- exception CommunicationError
Bases:
ServiceAccessError
- exception ErrorBodyIsNotJSONError
Bases:
ServiceAccessError
- exception ErrorJSONInvalidFormatError
Bases:
ServiceAccessError
- exception HTTPError(message, status_code)
Bases:
ServiceAccessError
- exception InvalidContentTypeError
Bases:
ServiceAccessError
- exception NoResponseFetchVersionError
Bases:
ServiceAccessError
- exception SSLError
Bases:
ServiceAccessError
- exception ServiceAccessError
Bases:
Exception
- exception UnauthorizedError
Bases:
ServiceAccessError
modelon.impact.client.sal.experiment module
Experiment service module.
- class ExperimentService(uri, http_client)
Bases:
object
- case_artifact_get(workspace_id, experiment_id, case_id, artifact_id)
- Return type:
Tuple
[bytes
,str
]
- case_artifacts_meta_get(workspace_id, experiment_id, case_id)
- Return type:
Dict
[str
,Any
]
- case_get(workspace_id, experiment_id, case_id)
- Return type:
Dict
[str
,Any
]
- case_get_log(workspace_id, experiment_id, case_id)
- Return type:
str
- case_put(workspace_id, experiment_id, case_id, case_data)
- Return type:
Dict
[str
,Any
]
- case_result_get(workspace_id, experiment_id, case_id, result_format=ResultFormat.MAT)
- Return type:
Tuple
[Union
[bytes
,str
],str
]
- case_result_upload(path_to_result, workspace_id, experiment_id, case_id, overwrite=False)
- Return type:
Dict
[str
,Any
]
- case_result_variables_get(workspace_id, experiment_id, case_id)
- Return type:
List
[str
]
- case_trajectories_get(workspace_id, experiment_id, case_id, variables, last_point_only)
- Return type:
List
[str
]
- cases_get(workspace_id, experiment_id)
- Return type:
Dict
[str
,Any
]
- custom_artifact_upload(path_to_artifact, workspace_id, experiment_id, case_id, artifact_id=None, overwrite=False)
- Return type:
Dict
[str
,Any
]
- execute_cancel(workspace_id, experiment_id)
- Return type:
None
- execute_status(workspace_id, experiment_id)
- Return type:
Dict
[str
,Any
]
- experiment_delete(workspace_id, exp_id)
- Return type:
None
- experiment_execute(workspace_id, exp_id, case_ids=None)
- Return type:
str
- experiment_result_variables_get(workspace_id, experiment_id)
- Return type:
List
[str
]
- experiment_set_label(workspace_id, exp_id, label)
- Return type:
None
- trajectories_get(workspace_id, experiment_id, variables, last_point_only, format=None)
- Return type:
Any
modelon.impact.client.sal.exports module
Export service module.
modelon.impact.client.sal.external_result module
External result service module.
modelon.impact.client.sal.http module
HTTP client class.
- class HTTPClient(api_key=None, context=None)
Bases:
object
- delete_json(url, body=None)
- Return type:
None
- get_csv(url, headers=None)
- Return type:
- get_file_response(url)
- Return type:
- get_json(url, headers=None, params=None)
- Return type:
Any
- get_json_response(url, headers=None, params=None)
- Return type:
- get_mat(url, headers=None)
- Return type:
- get_octet_response(url)
- Return type:
- get_text(url)
- Return type:
str
- get_xml(url, headers=None)
- Return type:
str
- get_zip(url)
- Return type:
bytes
- patch_json_no_response_body(url, body=None)
- Return type:
None
- post_json(url, body=None, files=None, headers=None)
- Return type:
Any
- post_json_no_response_body(url, body=None)
- Return type:
None
- put_json(url, body=None, headers=None)
- Return type:
Any
- put_json_no_response_body(url, body=None)
- Return type:
None
modelon.impact.client.sal.imports module
Import service module.
modelon.impact.client.sal.model_executable module
Model executable service module.
- class ModelExecutableService(uri, http_client)
Bases:
object
- compile_cancel(workspace_id, fmu_id)
- Return type:
None
- compile_log(workspace_id, fmu_id)
- Return type:
str
- compile_model(workspace_id, fmu_id)
- Return type:
str
- compile_status(workspace_id, fmu_id)
- Return type:
Dict
[str
,Any
]
- fmu_delete(workspace_id, fmu_id)
- Return type:
None
- fmu_setup(workspace_id, options, get_cached)
- Return type:
Tuple
[str
,List
[Dict
[str
,Any
]]]
- model_description_get(workspace_id, fmu_id)
- Return type:
str
- settable_parameters_get(workspace_id, fmu_id)
- Return type:
List
[str
]
- ss_fmu_metadata_get(workspace_id, fmu_id, parameter_state)
- Return type:
Dict
[str
,Any
]
modelon.impact.client.sal.project module
Project service module.
- class ProjectService(uri, http_client)
Bases:
object
- fmu_import(project_id, content_id, fmu_path, class_name, overwrite=False, include_patterns=None, exclude_patterns=None, top_level_inputs=None, step_size=0.0)
- Return type:
Dict
[str
,Any
]
- import_from_zip(path_to_project)
- Return type:
Dict
[str
,Any
]
- project_content_delete(project_id, content_id)
- Return type:
None
- project_content_get(project_id, content_id)
- Return type:
Dict
[str
,Any
]
- project_content_upload(path_to_result, project_id, content_type)
- Return type:
Dict
[str
,Any
]
- project_default_options_get(workspace_id, custom_function)
- Return type:
Dict
[str
,Any
]
- project_delete(project_id)
- Return type:
None
- project_get(project_id, vcs_info, size_info)
- Return type:
Dict
[str
,Any
]
- project_options_get(project_id, workspace_id, custom_function)
- Return type:
Dict
[str
,Any
]
- project_put(project_id, project_data)
- Return type:
None
- projects_get(vcs_info, project_type=None, storage_location=None)
- Return type:
Dict
[str
,Any
]
modelon.impact.client.sal.request module
Request class.
- class Request(context, method, url, request_type, body=None, files=None, headers=None, params=None)
Bases:
object
- execute(check_return=True)
- Return type:
Any
modelon.impact.client.sal.response module
Response class.
- class CSVResponse(resp_obj)
Bases:
FileResponse
- class FileResponse(resp_obj, content_type=None)
Bases:
Response
- property file_name: str
- property headers: Dict[str, Any]
- property stream: bytes
- class JSONResponse(resp_obj)
Bases:
Response
- property data: Dict[str, Any]
- property headers: Dict[str, Any]
- class MatStreamResponse(resp_obj)
Bases:
FileResponse
- class OctetStreamResponse(resp_obj)
Bases:
FileResponse
- class Response(resp_obj)
Bases:
object
- property error: ResponseError
- property ok: bool
- property status_code: int
- class ResponseError(message, code)
Bases:
object
modelon.impact.client.sal.service module
Service class.
- class Service(uri, api_key, context=None)
Bases:
object
- api_get_metadata()
- Return type:
Dict
[str
,Any
]
- get_executions()
- Return type:
Dict
[str
,Any
]
- is_jupyterhub_url(uri, context=None)
- Return type:
bool
modelon.impact.client.sal.uri module
URI class.
modelon.impact.client.sal.users module
Users service module.
modelon.impact.client.sal.workspace module
Workspace service module.
- class WorkspaceService(uri, http_client)
Bases:
object
- delete_published_workspace(sharing_id)
- Return type:
None
- dependencies_get(workspace_id, vcs_info, include_disabled)
- Return type:
Dict
[str
,Any
]
- experiment_create(workspace_id, definition, user_data=None)
- Return type:
Dict
[str
,Any
]
- experiment_get(workspace_id, experiment_id)
- Return type:
Dict
[str
,Any
]
- experiments_get(workspace_id, class_path=None)
- Return type:
Dict
[str
,Any
]
- fmu_download(workspace_id, fmu_id)
- Return type:
bytes
- fmu_get(workspace_id, fmu_id)
- Return type:
Dict
[str
,Any
]
- fmus_get(workspace_id)
- Return type:
Dict
[str
,Any
]
- get_project_matchings(shared_definition)
- Return type:
Dict
[str
,Any
]
- get_published_workspace(sharing_id)
- Return type:
Dict
[str
,Any
]
- get_published_workspace_acl(sharing_id)
- Return type:
Dict
[str
,Any
]
- get_published_workspaces(name='', first=0, maximum=20, has_data=False, owner_username='', type=None, group_name=None)
- Return type:
Dict
[str
,Any
]
- get_published_workspaces_by_kind(kind='', first=0, maximum=20)
- Return type:
Dict
[str
,Any
]
- get_workspace_conversion_status(location)
- Return type:
Dict
[str
,Any
]
- grant_community_access(sharing_id)
- Return type:
None
- grant_group_access(sharing_id, group_name=None)
- Return type:
None
- grant_user_access(sharing_id, username)
- Return type:
None
- import_dependency_from_zip(workspace_id, path_to_project)
- Return type:
Dict
[str
,Any
]
- import_from_cloud(sharing_id, overwrite_workspace_id=None)
- Return type:
Dict
[str
,Any
]
- Return type:
Dict
[str
,Any
]
- import_from_zip(path_to_workspace)
- Return type:
Dict
[str
,Any
]
- import_project_from_zip(workspace_id, path_to_project)
- Return type:
Dict
[str
,Any
]
- project_create(workspace_id, name)
- Return type:
Dict
[str
,Any
]
- projects_get(workspace_id, vcs_info, include_disabled)
- Return type:
Dict
[str
,Any
]
- rename_published_workspace(sharing_id, workspace_name)
- Return type:
None
- request_user_access(sharing_id)
- Return type:
None
- revoke_community_access(sharing_id)
- Return type:
None
- revoke_group_access(sharing_id, group_name)
- Return type:
None
- revoke_user_access(sharing_id, username)
- Return type:
None
- Return type:
Dict
[str
,Any
]
- update_workspace(workspace_id, data)
- Return type:
Dict
[str
,Any
]
- workspace_conversion_setup(workspace_id, backup_name)
- Return type:
Dict
[str
,Any
]
- workspace_create(name)
- Return type:
Dict
[str
,Any
]
- workspace_delete(workspace_id)
- Return type:
None
- workspace_export_setup(workspace_id, publish, class_path=None, access_settings=None)
- Return type:
Dict
[str
,Any
]
- workspace_get(workspace_id, size_info)
- Return type:
Dict
[str
,Any
]
- workspaces_get(only_app_mode=False, name=None, sharing_id=None)
- Return type:
Dict
[str
,Any
]