package.py
        
Package            (Node)
        
¶
    Package object to interact with Celonis Studio API.
package_nodes_url: str
  
      property
      readonly
  
¶
    API
- /package-manager/api/nodes/by-root-id/{package_id}
publish_url: str
  
      property
      readonly
  
¶
    API
- /package-manager/api/packages/{package_key}/activate
variable_assignments_url: str
  
      property
      readonly
  
¶
    API
- /package-manager/api/nodes/by-package-key/{package_key}/variables
draft_id: str
  
      property
      readonly
  
¶
    Get the Package Draft ID.
active_version
  
      property
      readonly
  
¶
    Get the current active version of the Package.
content: Dict
  
      property
      writable
  
¶
    Get/Set the Package Content.
Returns:
| Type | Description | 
|---|---|
| Dict | Serialized Content of the Package. | 
variables: List[Dict]
  
      property
      writable
  
¶
    Get/Set all Variables of the Package.
Returns:
| Type | Description | 
|---|---|
| List[Dict] | All Variables of the Package. | 
variable_assignments: List[Dict]
  
      property
      readonly
  
¶
    Get all Variable Assignments of the Package.
API
- GET: /package-manager/api/nodes/by-package-key/{package_key}/variables/values
Returns:
| Type | Description | 
|---|---|
| List[Dict] | List of Variable Assignments. | 
history: List[Dict]
  
      property
      readonly
  
¶
    Get the Package History.
API
- GET: /package-manager/api/packages/{package_id}/history
Returns:
| Type | Description | 
|---|---|
| List[Dict] | List of dictionaries containing history of published versions and active versions. | 
nodes: CelonisCollection[BaseNode]
  
      property
      readonly
  
¶
    Get all Nodes of the Package.
Returns:
| Type | Description | 
|---|---|
| CelonisCollection[BaseNode] | A Collection of Nodes of the Package. | 
knowledge_models: CelonisCollection[KnowledgeModel]
  
      property
      readonly
  
¶
    Get all Knowledge Models of the Package.
Returns:
| Type | Description | 
|---|---|
| CelonisCollection[KnowledgeModel] | A Collection of Knowledge Models of the Package. | 
analyses: CelonisCollection[Analysis]
  
      property
      readonly
  
¶
    Get all Analysis of the Package.
Returns:
| Type | Description | 
|---|---|
| CelonisCollection[Analysis] | A Collection of Analysis of the Package. | 
views: CelonisCollection[View]
  
      property
      readonly
  
¶
    Get all Views of the Package.
Returns:
| Type | Description | 
|---|---|
| CelonisCollection[View] | A Collection of Views of the Package. | 
skills: CelonisCollection[Skill]
  
      property
      readonly
  
¶
    Get all Skills of the Package.
Returns:
| Type | Description | 
|---|---|
| CelonisCollection[Skill] | A Collection of Skills of the Package. | 
folders: CelonisCollection[Folder]
  
      property
      readonly
  
¶
    Get all Folders of the Package.
Returns:
| Type | Description | 
|---|---|
| CelonisCollection[Folder] | A Collection of Folders of the Package. | 
get_node_by_key(self, node_key)
¶
    Get a Node of the Package by Key.
API
- GET: /package-manager/api/nodes/by-root-id/{package_id}
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| node_key | str | Key of the node. | required | 
Exceptions:
| Type | Description | 
|---|---|
| PyCelonisNotFoundError | If Node was not found. | 
Returns:
| Type | Description | 
|---|---|
| BaseNode | The specific Node by Key. | 
publish(self, version=None, node_ids_to_exclude=None)
¶
    Publishes current package using new version
Parameters¶
version : str, optional New version number following semantic versioning format (X.X.X). If left blank the currently active version number will be used and increased by one (until a nonexistent version number is found). node_ids_to_exclude : list of str List of ids of nodes that will be excluded from publishing
create_variable(self, name, value, variable_type='DATA_MODEL', description='')
¶
    Creates a new Variable in the Package and assigns the value to it.
API
- POST: /package-manager/api/nodes/by-package-key/{package_key}/variables
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| name | str | Name of the Variable. | required | 
| value | str | Value to be set for the Variable. | required | 
| variable_type | str | Type of the Variable. One of [ | 'DATA_MODEL' | 
| description | str | Description for the Variable. | '' | 
Exceptions:
| Type | Description | 
|---|---|
| PyCelonisValueError | If  | 
Returns:
| Type | Description | 
|---|---|
| Dict | The newly created Variable. | 
create_knowledge_model(self, name, key=None, data_model_id='', data_model_variable='', kind='BASE', base_key=None)
¶
    Creates a new Knowledge Model in the Package.
API
- POST: /semantic-layer/api/semantic-models- { "parentNodeId": self.id, "finalModelOptions": { "withVariableReplacement": True, "withAutogeneratedDataModelData": True }, # kind=EXTENSION "base": { "key": base_key, "version": base_km.parent.active_version } "content": { "kind": kind, "metadata": { "key": key or name, "displayName": name, }, "dataModelId": data_model_id or "{{data_model_variable}}", } }
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| name | str | Name of Knowledge Model. | required | 
| key | str | Key of Knowledge Model. | None | 
| data_model_id | str | ID of associated Datamodel (can't be set at the same time as  | '' | 
| data_model_variable | str | Key associated with desired Datamodel. | '' | 
| kind | str | Kind of Knowledge Model. One of [ | 'BASE' | 
| base_key | str | Key of Base Knowledge Model. Only if  | None | 
Exceptions:
| Type | Description | 
|---|---|
| PyCelonisValueError | If both  | 
| PyCelonisValueError | If  | 
| PyCelonisValueError | If 'base_key' not set when  | 
Returns:
| Type | Description | 
|---|---|
| KnowledgeModel | The newly created Knowledge Model. | 
create_analysis(self, name, data_model_variable='', data_model_id='', key=None)
¶
    Creates a new Analysis in the Package.
API
- POST: /process-analytics/analysis/v2/api/analysis
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
| name | str | Name of the Analysis. | required | 
| data_model_variable | str | Key associated with the desired Datamodel. | '' | 
| data_model_id | str | Uuid of the Datamodel. | '' | 
| key | str | Key of the Analysis. | None | 
Exceptions:
| Type | Description | 
|---|---|
| PyCelonisValueError | If both  | 
Returns:
| Type | Description | 
|---|---|
| Analysis | The newly created Analysis. | 
delete(self)
¶
    Deletes the Package.
API
- DELETE: /package-manager/api/packages/{self.id}