Skip to content

simulation

Module to interact with Simulations.

This module contains class to interact with Simulations in Studio.

Typical usage example:

```python
simulation = package.get_simulation(SIMULATION_ID)
simulation.delete()
```

Simulation

Bases: ContentNode

Simulation object to interact with simulation specific studio endpoints.

permissions class-attribute instance-attribute

permissions = Field(None, alias='permissions')

tenant_id class-attribute instance-attribute

tenant_id = Field(None, alias='tenantId')

id instance-attribute

id

Id of studio content node.

key instance-attribute

key

Key of studio content node.

name class-attribute instance-attribute

name = Field(None, alias='name')

root_node_key instance-attribute

root_node_key

Key of root content node.

base class-attribute instance-attribute

base = Field(None, alias='base')

asset_type class-attribute instance-attribute

asset_type = Field(None, alias='assetType')

node_type class-attribute instance-attribute

node_type = Field(None, alias='nodeType')

parent_node_key class-attribute instance-attribute

parent_node_key = Field(None, alias='parentNodeKey')

parent_node_id class-attribute instance-attribute

parent_node_id = Field(None, alias='parentNodeId')

invalid_content class-attribute instance-attribute

invalid_content = Field(None, alias='invalidContent')

serialized_content instance-attribute

serialized_content

Serialized content of content node.

serialization_type class-attribute instance-attribute

serialization_type = Field(None, alias='serializationType')

draft_id class-attribute instance-attribute

draft_id = Field(None, alias='draftId')

working_draft_id class-attribute instance-attribute

working_draft_id = Field(None, alias='workingDraftId')

activated_draft_id class-attribute instance-attribute

activated_draft_id = Field(None, alias='activatedDraftId')

show_in_viewer_mode class-attribute instance-attribute

show_in_viewer_mode = Field(None, alias='showInViewerMode')

public_available class-attribute instance-attribute

public_available = Field(None, alias='publicAvailable')

embeddable class-attribute instance-attribute

embeddable = Field(None, alias='embeddable')

root_node_id instance-attribute

root_node_id

Id of of root content node.

order class-attribute instance-attribute

order = Field(None, alias='order')

source class-attribute instance-attribute

source = Field(None, alias='source')

asset_metadata_transport class-attribute instance-attribute

asset_metadata_transport = Field(
    None, alias="assetMetadataTransport"
)

space_id instance-attribute

space_id

Id of space where content node is located.

change_date class-attribute instance-attribute

change_date = Field(None, alias='changeDate')

created_by_id class-attribute instance-attribute

created_by_id = Field(None, alias='createdById')

creation_date class-attribute instance-attribute

creation_date = Field(None, alias='creationDate')

created_by_name class-attribute instance-attribute

created_by_name = Field(None, alias='createdByName')

updated_by class-attribute instance-attribute

updated_by = Field(None, alias='updatedBy')

root class-attribute instance-attribute

root = Field(None, alias='root')

asset class-attribute instance-attribute

asset = Field(None, alias='asset')

object_id class-attribute instance-attribute

object_id = Field(None, alias='objectId')

root_with_key instance-attribute

root_with_key

identifier class-attribute instance-attribute

identifier = Field(None, alias='identifier')

client class-attribute instance-attribute

client = Field(..., exclude=True)

from_transport classmethod

from_transport(client, content_node_transport)

Creates high-level content node object from given ContentNodeTransport.

Parameters:

  • client (Client) –

    Client to use to make API calls for given content node.

  • content_node_transport (ContentNodeTransport) –

    ContentNodeTransport object containing properties of content node.

Returns:

  • ContentNode

    A ContentNode object with properties from transport and given client.

update

update()

Pushes local changes of content node to EMS and updates properties with response from EMS.

sync

sync()

Syncs content node properties with EMS.

delete

delete()

Deletes content node.

copy_to

copy_to(
    destination_package,
    destination_team_domain,
    overwrite=False,
    delete_source=False,
    **kwargs
)

Copies a content node to the specified domain and package in the same realm (ex. eu-1).

Parameters:

  • destination_package (Package) –

    The Package object to copy the asset to.

  • destination_team_domain (str) –

    The of the destination team url: https://..celonis.cloud/

  • overwrite (bool, default: False ) –

    If true, any node with the same key will be overwritten. If false, a PyCelonisNodeAlreadyExistsError will be raised.

  • delete_source (bool, default: False ) –

    If true, deletes the node from the source. If false, keeps the source node.

  • **kwargs (Any, default: {} ) –

    Additional parameters set for ContentNodeCopyTransport

Returns:

Examples:

Copy a package:

package = space.get_package(<package_id>)
new_package = space.create_package("NEW_PACKAGE")
new_package.publish()
copied_package_transport = package.copy_to(new_package, <destination_team_domain>)

Copy a package asset:

new_package = space.create_package("NEW_PACKAGE")
copied_analysis_transport = analysis.copy_to(
    new_package, <destination_team_domain>
)

is_package staticmethod

is_package(content_node_transport)

Returns whether content node transport is package.

Parameters:

Returns:

  • bool

    Boolean if transport is package.

is_folder staticmethod

is_folder(content_node_transport)

Returns whether content node transport is package.

Parameters:

Returns:

  • bool

    Boolean if transport is folder.

is_analysis staticmethod

is_analysis(content_node_transport)

Returns whether content node transport is analysis.

Parameters:

Returns:

  • bool

    Boolean if transport is analysis.

is_knowledge_model staticmethod

is_knowledge_model(content_node_transport)

Returns whether content node transport is knowledge model.

Parameters:

Returns:

  • bool

    Boolean if transport is knowledge model.

is_action_flow staticmethod

is_action_flow(content_node_transport)

Returns whether content node transport is action flow.

Parameters:

Returns:

  • bool

    Boolean if transport is action flow.

is_view staticmethod

is_view(content_node_transport)

Returns whether content node transport is view.

Parameters:

Returns:

  • bool

    Boolean if transport is view.

is_simulation staticmethod

is_simulation(content_node_transport)

Returns whether content node transport is simulation.

Parameters:

Returns:

  • bool

    Boolean if transport is simulation.

is_skill staticmethod

is_skill(content_node_transport)

Returns whether content node transport is skill.

Parameters:

Returns:

  • bool

    Boolean if transport is skill.