AAS HTTP Client Documentation
Loading...
Searching...
No Matches
sdk_wrapper.SdkWrapper Class Reference

Represents a wrapper for the BaSyx Python SDK to communicate with a REST API. More...

Collaboration diagram for sdk_wrapper.SdkWrapper:
[legend]

Public Member Functions

 __init__ (self, str config_string, str basic_auth_password="", str o_auth_client_secret="", str bearer_auth_token="")
 Initializes the wrapper with the given configuration.
 
 set_encoded_ids (self, IdEncoding encoded_ids)
 Sets whether to use encoded IDs for API requests.
 
IdEncoding get_encoded_ids (self)
 Gets whether encoded IDs are used for API requests.
 
AasHttpClient get_client (self)
 Returns the underlying AAS HTTP client.
 
model.AssetAdministrationShell|None get_asset_administration_shell_by_id (self, str aas_identifier)
 Returns a specific Asset Administration Shell.
 
bool put_asset_administration_shell_by_id (self, str aas_identifier, model.AssetAdministrationShell aas)
 Creates or replaces an existing Asset Administration Shell.
 
bool delete_asset_administration_shell_by_id (self, str aas_identifier)
 Deletes an Asset Administration Shell.
 
Attachment|None get_thumbnail_aas_repository (self, str aas_identifier)
 Downloads the thumbnail of a specific Asset Administration Shell.
 
bool put_thumbnail_aas_repository (self, str aas_identifier, str file_name, Path file)
 Creates or updates the thumbnail of the Asset Administration Shell.
 
bool delete_thumbnail_aas_repository (self, str aas_identifier)
 Deletes the thumbnail of a specific Asset Administration Shell.
 
ShellPaginatedData|None get_all_asset_administration_shells (self, list[dict]|None asset_ids=None, str id_short="", int limit=100, str cursor="")
 Returns all Asset Administration Shells.
 
model.AssetAdministrationShell|None post_asset_administration_shell (self, model.AssetAdministrationShell aas)
 Creates a new Asset Administration Shell.
 
ReferencePaginatedData|None get_all_submodel_references_aas_repository (self, str aas_identifier, int limit=100, str cursor="")
 Returns all submodel references.
 
model.ModelReference|None post_submodel_reference_aas_repository (self, str aas_identifier, model.ModelReference submodel_reference)
 Creates a submodel reference at the Asset Administration Shell.
 
bool delete_submodel_reference_by_id_aas_repository (self, str aas_identifier, str submodel_identifier)
 Deletes the submodel reference from the Asset Administration Shell.
 
bool put_submodel_by_id_aas_repository (self, str aas_identifier, str submodel_identifier, model.Submodel submodel)
 Updates the Submodel.
 
model.Reference|None get_asset_administration_shell_by_id_reference_aas_repository (self, str aas_identifier)
 Returns a specific Asset Administration Shell as a Reference.
 
model.Submodel|None get_submodel_by_id_aas_repository (self, str aas_identifier, str submodel_identifier)
 Returns the Submodel.
 
model.Submodel|None get_submodel_by_id (self, str submodel_identifier, Level level=Level.default, Extent extent=Extent.default)
 Returns a specific Submodel.
 
bool put_submodels_by_id (self, str submodel_identifier, model.Submodel submodel)
 Updates a existing Submodel.
 
bool delete_submodel_by_id (self, str submodel_identifier)
 Deletes a Submodel.
 
model.SubmodelElement|None get_submodel_element_by_path_submodel_repo (self, str submodel_identifier, str id_short_path, Level level=Level.default, Extent extent=Extent.default)
 Returns a specific submodel element from the Submodel at a specified path.
 
bool put_submodel_element_by_path_submodel_repo (self, str submodel_identifier, str id_short_path, model.SubmodelElement submodel_element, Level level=Level.default)
 Updates a submodel element at a specified path within the submodel elements hierarchy.
 
model.SubmodelElement|None post_submodel_element_by_path_submodel_repo (self, str submodel_identifier, str id_short_path, model.SubmodelElement submodel_element, Level level=Level.default, Extent extent=Extent.default)
 Creates a new submodel element at a specified path within submodel elements hierarchy.
 
bool delete_submodel_element_by_path_submodel_repo (self, str submodel_identifier, str id_short_path)
 Deletes a submodel element at a specified path within the submodel elements hierarchy.
 
SubmodelPaginatedData|None get_all_submodels (self, str semantic_id="", str id_short="", int limit=0, str cursor="", Level level=Level.default, Extent extent=Extent.default)
 Returns all Submodels.
 
model.Submodel|None post_submodel (self, model.Submodel submodel)
 Creates a new Submodel.
 
SubmodelElementPaginatedData|None get_all_submodel_elements_submodel_repository (self, str submodel_identifier)
 Returns all submodel elements including their hierarchy.
 
model.SubmodelElement|None post_submodel_element_submodel_repo (self, str submodel_identifier, model.SubmodelElement submodel_element)
 Creates a new submodel element.
 
dict|None invoke_operation_submodel_repo (self, str submodel_identifier, str id_short_path, dict request_body, str async_="async")
 Synchronously invokes an Operation at a specified path.
 
str|None get_submodel_element_by_path_value_only_submodel_repo (self, str submodel_identifier, str id_short_path)
 Retrieves the value of a specific SubmodelElement.
 
bool patch_submodel_element_by_path_value_only_submodel_repo (self, str submodel_identifier, str submodel_element_path, str value)
 Updates the value of an existing SubmodelElement.
 
dict|None get_submodel_by_id_value_only (self, str submodel_identifier, Level level=Level.default, Extent extent=Extent.default)
 Returns the value of a specific Submodel.
 
bool patch_submodel_by_id_value_only (self, str submodel_identifier, dict request_body, Level level=Level.default)
 Updates the values of an existing Submodel.
 
dict|None get_submodel_by_id_metadata (self, str submodel_identifier, str level="")
 Returns the metadata attributes of a specific Submodel.
 
bool patch_submodel_by_id (self, str submodel_identifier, model.Submodel submodel)
 Updates an existing Submodel.
 
Attachment|None experimental_get_file_by_path_submodel_repo (self, str submodel_identifier, str id_short_path)
 Downloads file content from a specific submodel element from the Submodel at a specified path.
 
bool experimental_post_file_by_path_submodel_repo (self, str submodel_identifier, str id_short_path, Path file)
 Uploads file content to an existing submodel element at a specified path within submodel elements hierarchy.
 
bool experimental_put_file_by_path_submodel_repo (self, str submodel_identifier, str id_short_path, Path file)
 Uploads file content to an existing submodel element at a specified path within submodel elements hierarchy.
 
bool experimental_delete_file_by_path_submodel_repo (self, str submodel_identifier, str id_short_path)
 Deletes file content of an existing submodel element at a specified path within submodel elements hierarchy.
 

Public Attributes

 base_url
 

Static Public Attributes

str base_url = ""
 

Protected Attributes

 _client
 

Static Protected Attributes

AasHttpClient _client
 

Detailed Description

Represents a wrapper for the BaSyx Python SDK to communicate with a REST API.

Definition at line 108 of file sdk_wrapper.py.

Constructor & Destructor Documentation

◆ __init__()

sdk_wrapper.SdkWrapper.__init__ (   self,
str  config_string,
str   basic_auth_password = "",
str   o_auth_client_secret = "",
str   bearer_auth_token = "" 
)

Initializes the wrapper with the given configuration.

Parameters
config_stringConfiguration string for the BaSyx server connection.
basic_auth_passwordPassword for the BaSyx server interface client, defaults to "".
o_auth_client_secretClient secret for OAuth authentication, defaults to "".
bearer_auth_tokenBearer token for authentication, defaults to "".

Definition at line 120 of file sdk_wrapper.py.

Member Function Documentation

◆ delete_asset_administration_shell_by_id()

bool sdk_wrapper.SdkWrapper.delete_asset_administration_shell_by_id (   self,
str  aas_identifier 
)

Deletes an Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id (decoded)
Returns
True if the deletion was successful, False otherwise

Definition at line 205 of file sdk_wrapper.py.

◆ delete_submodel_by_id()

bool sdk_wrapper.SdkWrapper.delete_submodel_by_id (   self,
str  submodel_identifier 
)

Deletes a Submodel.

Parameters
submodel_identifierID of the submodel to delete
Returns
True if the deletion was successful, False otherwise

Definition at line 468 of file sdk_wrapper.py.

◆ delete_submodel_element_by_path_submodel_repo()

bool sdk_wrapper.SdkWrapper.delete_submodel_element_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path 
)

Deletes a submodel element at a specified path within the submodel elements hierarchy.

Parameters
submodel_identifierEncoded ID of the Submodel to delete submodel element from
id_short_pathPath of the Submodel element to delete
Returns
True if the deletion was successful, False otherwise

Definition at line 565 of file sdk_wrapper.py.

◆ delete_submodel_reference_by_id_aas_repository()

bool sdk_wrapper.SdkWrapper.delete_submodel_reference_by_id_aas_repository (   self,
str  aas_identifier,
str  submodel_identifier 
)

Deletes the submodel reference from the Asset Administration Shell.

Does not delete the submodel itself.

Parameters
aas_identifierThe Asset Administration Shells unique id
submodel_identifierThe Submodels unique id
Returns
True if the deletion was successful, False otherwise

Definition at line 356 of file sdk_wrapper.py.

◆ delete_thumbnail_aas_repository()

bool sdk_wrapper.SdkWrapper.delete_thumbnail_aas_repository (   self,
str  aas_identifier 
)

Deletes the thumbnail of a specific Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id (decoded)
Returns
True if the deletion was successful, False otherwise

Definition at line 256 of file sdk_wrapper.py.

◆ experimental_delete_file_by_path_submodel_repo()

bool sdk_wrapper.SdkWrapper.experimental_delete_file_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path 
)

Deletes file content of an existing submodel element at a specified path within submodel elements hierarchy.

Experimental feature - may not be supported by all servers.

Parameters
submodel_identifierThe Submodels unique id
id_short_pathIdShort path to the submodel element (dot-separated)
Returns
True if deletion was successful, False otherwise

Definition at line 869 of file sdk_wrapper.py.

◆ experimental_get_file_by_path_submodel_repo()

Attachment | None sdk_wrapper.SdkWrapper.experimental_get_file_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path 
)

Downloads file content from a specific submodel element from the Submodel at a specified path.

Experimental feature - may not be supported by all servers.

Parameters
submodel_identifierThe Submodels unique id
id_short_pathIdShort path to the submodel element (dot-separated)
Returns
Attachment object with file content as bytes (octet-stream) or None if an error occurred

Definition at line 811 of file sdk_wrapper.py.

Here is the call graph for this function:

◆ experimental_post_file_by_path_submodel_repo()

bool sdk_wrapper.SdkWrapper.experimental_post_file_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path,
Path  file 
)

Uploads file content to an existing submodel element at a specified path within submodel elements hierarchy.

Experimental feature - may not be supported by all servers.

Parameters
submodel_identifierThe Submodels unique id
id_short_pathIdShort path to the submodel element (dot-separated)
filePath to the file to upload as attachment
Returns
Attachment data as bytes or None if an error occurred

Definition at line 842 of file sdk_wrapper.py.

◆ experimental_put_file_by_path_submodel_repo()

bool sdk_wrapper.SdkWrapper.experimental_put_file_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path,
Path  file 
)

Uploads file content to an existing submodel element at a specified path within submodel elements hierarchy.

Experimental feature - may not be supported by all servers.

Parameters
submodel_identifierThe Submodels unique id
id_short_pathIdShort path to the submodel element (dot-separated)
filePath to the file to upload as attachment
Returns
Attachment data as bytes or None if an error occurred

Definition at line 856 of file sdk_wrapper.py.

◆ get_all_asset_administration_shells()

ShellPaginatedData | None sdk_wrapper.SdkWrapper.get_all_asset_administration_shells (   self,
list[dict] | None   asset_ids = None,
str   id_short = "",
int   limit = 100,
str   cursor = "" 
)

Returns all Asset Administration Shells.

Parameters
assetIdsA list of specific Asset identifiers (format: {"identifier": "string", "encodedIdentifier": "string"})
idShortThe Asset Administration Shell's IdShort
limitThe maximum number of elements in the response array
cursorA server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
Returns
List of paginated Asset Administration Shells or None if an error occurred

Definition at line 272 of file sdk_wrapper.py.

◆ get_all_submodel_elements_submodel_repository()

SubmodelElementPaginatedData | None sdk_wrapper.SdkWrapper.get_all_submodel_elements_submodel_repository (   self,
str  submodel_identifier 
)

Returns all submodel elements including their hierarchy.

!!!Serialization to model.SubmodelElement currently not possible.

Parameters
submodel_identifierEncoded ID of the Submodel to retrieve elements from
Returns
List of Submodel elements or None if an error occurred

Definition at line 632 of file sdk_wrapper.py.

◆ get_all_submodel_references_aas_repository()

ReferencePaginatedData | None sdk_wrapper.SdkWrapper.get_all_submodel_references_aas_repository (   self,
str  aas_identifier,
int   limit = 100,
str   cursor = "" 
)

Returns all submodel references.

Parameters
aas_identifierThe Asset Administration Shells unique id
limitThe maximum number of elements in the response array
cursorA server-generated identifier retrieved from pagingMetadata that specifies from which position the result listing should continue
Returns
List of paginated Submodel References or None if an error occurred

Definition at line 315 of file sdk_wrapper.py.

◆ get_all_submodels()

SubmodelPaginatedData | None sdk_wrapper.SdkWrapper.get_all_submodels (   self,
str   semantic_id = "",
str   id_short = "",
int   limit = 0,
str   cursor = "",
Level   level = Level.default,
Extent   extent = Extent.default 
)

Returns all Submodels.

Parameters
semantic_idThe value of the semantic id reference (UTF8-BASE64-URL-encoded)
id_shortThe idShort of the Submodel
limitMaximum number of Submodels to return
cursorCursor for pagination
levelDetermines the structural depth of the respective resource content. Available values : deep, core
extentDetermines to which extent the resource is being serialized. Available values : withBlobValue, withoutBlobValue
Returns
List of Submodel or None if an error occurred

Definition at line 583 of file sdk_wrapper.py.

◆ get_asset_administration_shell_by_id()

model.AssetAdministrationShell | None sdk_wrapper.SdkWrapper.get_asset_administration_shell_by_id (   self,
str  aas_identifier 
)

Returns a specific Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id (decoded)
Returns
Asset Administration Shells or None if an error occurred

Definition at line 166 of file sdk_wrapper.py.

Here is the caller graph for this function:

◆ get_asset_administration_shell_by_id_reference_aas_repository()

model.Reference | None sdk_wrapper.SdkWrapper.get_asset_administration_shell_by_id_reference_aas_repository (   self,
str  aas_identifier 
)

Returns a specific Asset Administration Shell as a Reference.

Parameters
aas_identifierID of the AAS reference to retrieve
Returns
Asset Administration Shells reference object or None if an error occurred

Definition at line 391 of file sdk_wrapper.py.

Here is the call graph for this function:

◆ get_client()

AasHttpClient sdk_wrapper.SdkWrapper.get_client (   self)

Returns the underlying AAS HTTP client.

Returns
The AAS HTTP client instance.

Definition at line 153 of file sdk_wrapper.py.

◆ get_encoded_ids()

IdEncoding sdk_wrapper.SdkWrapper.get_encoded_ids (   self)

Gets whether encoded IDs are used for API requests.

Returns
True if encoded IDs are used, False otherwise

Definition at line 143 of file sdk_wrapper.py.

◆ get_submodel_by_id()

model.Submodel | None sdk_wrapper.SdkWrapper.get_submodel_by_id (   self,
str  submodel_identifier,
Level   level = Level.default,
Extent   extent = Extent.default 
)

Returns a specific Submodel.

Parameters
submodel_identifierEncoded ID of the Submodel to retrieve
levelDetermines the structural depth of the respective resource content. Available values : deep, core
extentDetermines to which extent the resource is being serialized. Available values : withBlobValue, withoutBlobValue
Returns
Submodel data or None if an error occurred

Definition at line 431 of file sdk_wrapper.py.

◆ get_submodel_by_id_aas_repository()

model.Submodel | None sdk_wrapper.SdkWrapper.get_submodel_by_id_aas_repository (   self,
str  aas_identifier,
str  submodel_identifier 
)

Returns the Submodel.

Parameters
aas_identifierID of the AAS to retrieve the submodel from
submodel_identifierID of the submodel to retrieve
Returns
Submodel or None if an error occurred

Definition at line 407 of file sdk_wrapper.py.

◆ get_submodel_by_id_metadata()

dict | None sdk_wrapper.SdkWrapper.get_submodel_by_id_metadata (   self,
str  submodel_identifier,
str   level = "" 
)

Returns the metadata attributes of a specific Submodel.

Parameters
submodel_identifierThe Submodels unique id
levelDetermines the structural depth of the respective resource content. Available values : deep, core
Returns
Metadata attributes of the Submodel as dict or None if an error occurred

Definition at line 762 of file sdk_wrapper.py.

◆ get_submodel_by_id_value_only()

dict | None sdk_wrapper.SdkWrapper.get_submodel_by_id_value_only (   self,
str  submodel_identifier,
Level   level = Level.default,
Extent   extent = Extent.default 
)

Returns the value of a specific Submodel.

Parameters
submodel_identifierEncoded ID of the Submodel to retrieve
levelDetermines the structural depth of the respective resource content. Available values : deep, core
extentDetermines to which extent the resource is being serialized. Available values : withBlobValue, withoutBlobValue
Returns
Submodel value as dictionary or None if an error occurred

Definition at line 728 of file sdk_wrapper.py.

◆ get_submodel_element_by_path_submodel_repo()

model.SubmodelElement | None sdk_wrapper.SdkWrapper.get_submodel_element_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path,
Level   level = Level.default,
Extent   extent = Extent.default 
)

Returns a specific submodel element from the Submodel at a specified path.

Parameters
submodel_identifierEncoded ID of the Submodel to retrieve element from
id_short_pathPath of the Submodel element to retrieve
levelDetermines the structural depth of the respective resource content. Available values : deep, core
extentDetermines to which extent the resource is being serialized. Available values : withBlobValue, withoutBlobValue
Returns
Submodel element data or None if an error occurred

Definition at line 484 of file sdk_wrapper.py.

Here is the caller graph for this function:

◆ get_submodel_element_by_path_value_only_submodel_repo()

str | None sdk_wrapper.SdkWrapper.get_submodel_element_by_path_value_only_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path 
)

Retrieves the value of a specific SubmodelElement.

Parameters
submodel_identifierThe Submodels unique id
id_short_pathIdShort path to the submodel element (dot-separated)
Returns
Submodel element value or None if an error occurred

Definition at line 698 of file sdk_wrapper.py.

◆ get_thumbnail_aas_repository()

Attachment | None sdk_wrapper.SdkWrapper.get_thumbnail_aas_repository (   self,
str  aas_identifier 
)

Downloads the thumbnail of a specific Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id (decoded)
Returns
Attachment object with thumbnail content as bytes (octet-stream) or None if an error occurred

Definition at line 218 of file sdk_wrapper.py.

◆ invoke_operation_submodel_repo()

dict | None sdk_wrapper.SdkWrapper.invoke_operation_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path,
dict  request_body,
str   async_ = "async" 
)

Synchronously invokes an Operation at a specified path.

Parameters
submodel_identifierThe Submodels unique id
id_short_pathIdShort path to the operation element (dot-separated)
request_bodyInput parameters for the operation
async_Determines whether an operation invocation is performed asynchronously or synchronously
Returns
Operation result or None if an error occurred

Definition at line 680 of file sdk_wrapper.py.

◆ patch_submodel_by_id()

bool sdk_wrapper.SdkWrapper.patch_submodel_by_id (   self,
str  submodel_identifier,
model.Submodel  submodel 
)

Updates an existing Submodel.

Parameters
submodel_identifierEncoded ID of the Submodel to delete
Returns
True if the patch was successful, False otherwise

Definition at line 782 of file sdk_wrapper.py.

◆ patch_submodel_by_id_value_only()

bool sdk_wrapper.SdkWrapper.patch_submodel_by_id_value_only (   self,
str  submodel_identifier,
dict  request_body,
Level   level = Level.default 
)

Updates the values of an existing Submodel.

Parameters
submodel_identifierThe Submodels unique id
request_bodySubmodel values to update as dict
levelDetermines the structural depth of the respective resource content. Available values : deep, core
Returns
True if the patch was successful, False otherwise

Definition at line 748 of file sdk_wrapper.py.

◆ patch_submodel_element_by_path_value_only_submodel_repo()

bool sdk_wrapper.SdkWrapper.patch_submodel_element_by_path_value_only_submodel_repo (   self,
str  submodel_identifier,
str  submodel_element_path,
str  value 
)

Updates the value of an existing SubmodelElement.

Parameters
submodel_identifierEncoded ID of the Submodel to update submodel element for
submodel_element_pathPath of the Submodel element to update
valueSubmodel element value to update as string
Returns
True if the patch was successful, False otherwise

Definition at line 713 of file sdk_wrapper.py.

◆ post_asset_administration_shell()

model.AssetAdministrationShell | None sdk_wrapper.SdkWrapper.post_asset_administration_shell (   self,
model.AssetAdministrationShell  aas 
)

Creates a new Asset Administration Shell.

Parameters
aasAsset Administration Shell to post
Returns
Asset Administration Shell or None if an error occurred

Definition at line 292 of file sdk_wrapper.py.

◆ post_submodel()

model.Submodel | None sdk_wrapper.SdkWrapper.post_submodel (   self,
model.Submodel  submodel 
)

Creates a new Submodel.

Parameters
submodelSubmodel to post
Returns
Submodel or None if an error occurred

Definition at line 609 of file sdk_wrapper.py.

◆ post_submodel_element_by_path_submodel_repo()

model.SubmodelElement | None sdk_wrapper.SdkWrapper.post_submodel_element_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path,
model.SubmodelElement  submodel_element,
Level   level = Level.default,
Extent   extent = Extent.default 
)

Creates a new submodel element at a specified path within submodel elements hierarchy.

Parameters
submodel_identifierEncoded ID of the submodel to create elements for
id_short_pathPath within the Submodel elements hierarchy
submodel_elementThe new Submodel element
levelDetermines the structural depth of the respective resource content. Available values : deep, core
extentDetermines to which extent the resource is being serialized. Available values : withBlobValue, withoutBlobValue
Returns
Submodel element object or None if an error occurred

Definition at line 531 of file sdk_wrapper.py.

◆ post_submodel_element_submodel_repo()

model.SubmodelElement | None sdk_wrapper.SdkWrapper.post_submodel_element_submodel_repo (   self,
str  submodel_identifier,
model.SubmodelElement  submodel_element 
)

Creates a new submodel element.

Parameters
submodel_identifierEncoded ID of the Submodel to create elements for
request_bodySubmodel element
Returns
Submodel or None if an error occurred

Definition at line 654 of file sdk_wrapper.py.

◆ post_submodel_reference_aas_repository()

model.ModelReference | None sdk_wrapper.SdkWrapper.post_submodel_reference_aas_repository (   self,
str  aas_identifier,
model.ModelReference  submodel_reference 
)

Creates a submodel reference at the Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
submodel_referenceReference to the Submodel
Returns
Reference Submodel object or None if an error occurred

Definition at line 334 of file sdk_wrapper.py.

◆ put_asset_administration_shell_by_id()

bool sdk_wrapper.SdkWrapper.put_asset_administration_shell_by_id (   self,
str  aas_identifier,
model.AssetAdministrationShell  aas 
)

Creates or replaces an existing Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id (decoded)
aasAsset Administration Shell to put
Returns
True if the update was successful, False otherwise

Definition at line 186 of file sdk_wrapper.py.

◆ put_submodel_by_id_aas_repository()

bool sdk_wrapper.SdkWrapper.put_submodel_by_id_aas_repository (   self,
str  aas_identifier,
str  submodel_identifier,
model.Submodel  submodel 
)

Updates the Submodel.

Parameters
aas_identifierThe Asset Administration Shells unique id (decoded)
submodel_identifierID of the submodel to put
submodelSubmodel to put
Returns
True if the update was successful, False otherwise

Definition at line 373 of file sdk_wrapper.py.

◆ put_submodel_element_by_path_submodel_repo()

bool sdk_wrapper.SdkWrapper.put_submodel_element_by_path_submodel_repo (   self,
str  submodel_identifier,
str  id_short_path,
model.SubmodelElement  submodel_element,
Level   level = Level.default 
)

Updates a submodel element at a specified path within the submodel elements hierarchy.

Parameters
submodel_identifierEncoded ID of the Submodel to update element for
id_short_pathPath of the Submodel element to update
request_bodySubmodel element data to update as dictionary
levelDetermines the structural depth of the respective resource content. Available values : deep, core
Returns
True if the update was successful, False otherwise

Definition at line 507 of file sdk_wrapper.py.

◆ put_submodels_by_id()

bool sdk_wrapper.SdkWrapper.put_submodels_by_id (   self,
str  submodel_identifier,
model.Submodel  submodel 
)

Updates a existing Submodel.

Parameters
submodel_identifierIdentifier of the submodel to update
submodelSubmodel data to update
Returns
True if the update was successful, False otherwise

Definition at line 450 of file sdk_wrapper.py.

◆ put_thumbnail_aas_repository()

bool sdk_wrapper.SdkWrapper.put_thumbnail_aas_repository (   self,
str  aas_identifier,
str  file_name,
Path  file 
)

Creates or updates the thumbnail of the Asset Administration Shell.

Parameters
aas_identifierThe Asset Administration Shells unique id
file_nameThe name of the thumbnail file
filePath to the thumbnail file to upload as attachment
Returns
True if the update was successful, False otherwise

Definition at line 243 of file sdk_wrapper.py.

◆ set_encoded_ids()

sdk_wrapper.SdkWrapper.set_encoded_ids (   self,
IdEncoding  encoded_ids 
)

Sets whether to use encoded IDs for API requests.

Parameters
encoded_idsIf enabled, all IDs used in API requests have to be base64-encoded

Definition at line 133 of file sdk_wrapper.py.

Member Data Documentation

◆ _client [1/2]

AasHttpClient sdk_wrapper.SdkWrapper._client
staticprotected

Definition at line 110 of file sdk_wrapper.py.

◆ _client [2/2]

sdk_wrapper.SdkWrapper._client
protected

Definition at line 126 of file sdk_wrapper.py.

◆ base_url [1/2]

str sdk_wrapper.SdkWrapper.base_url = ""
static

Definition at line 111 of file sdk_wrapper.py.

◆ base_url [2/2]

sdk_wrapper.SdkWrapper.base_url

Definition at line 127 of file sdk_wrapper.py.


The documentation for this class was generated from the following file: