Skip to main content
1-Visitor
June 15, 2020
Solved

How can I use python code in one thing?

  • June 15, 2020
  • 2 replies
  • 2797 views

How can I use python code in one thing?

Best answer by CarlesColl

Not out of the box on the ThingWorx Instance, it supports Server Side Javascript, Java and SQL (if it's a Remote BDD Thing).

 

"Workarounds", just thinking loud:

  • You can do an extension in Java which triggers the desired Python code.
  • You can do a Remote Thing which Implements ThingWorx Edge SDK and executes your Python Code -> Actually the Edge Microserver can execute LuaScript for instance. And you have Edge SDK for C, Dot.net and Java.

Just my two cents,

Carles.

 

2 replies

1-Visitor
June 15, 2020

Not out of the box on the ThingWorx Instance, it supports Server Side Javascript, Java and SQL (if it's a Remote BDD Thing).

 

"Workarounds", just thinking loud:

  • You can do an extension in Java which triggers the desired Python code.
  • You can do a Remote Thing which Implements ThingWorx Edge SDK and executes your Python Code -> Actually the Edge Microserver can execute LuaScript for instance. And you have Edge SDK for C, Dot.net and Java.

Just my two cents,

Carles.

 

19-Tanzanite
June 15, 2020

Adding to Carles' post, you should think how large is the overall impact on your system in terms of consumed resources. If it's a big impact, I would suggest to use the Edge Microserver or SDK's to do this processing in another container/VM. Nevertheless, regardless if you use an Extension or the Edge SDK, the difference in terms of implementation difference should be relatively minor.