Import API Library

Hello, I have faced some problem regarding import API library into Ignition Edge. I have an API which is the code is wrote in C and wrapped using Python. My problem is the Ignition Edge give an error when I executed the API. Is there is any way to make the Ignition Edge able to read the API library. :pray:

Probably not. igntion uses Jython

Because Ignition’s Python interpreter is Jython, that means unlike CPython, Java libraries are accessible. It also means C libraries aren’t accessible.

Libraries written in pure Python are generally available in Jython. Since the majority of the most popular Python libraries do require C libraries, the selection of Python libraries that can be used in Ignition directly is fairly limited. For example, numpi, scipi, pandas, and scikit-learn are all unavailable. However, libraries intended for the web and other less data-intensive applications sometimes work. Requests is a good example of a versatile REST library that you can import into Ignition.

4 Likes

Which meant ignition only accepted Jython and there is no other way to synchronize between the API with ignition?

You wont be able to import anything using C because ignition uses the Jython interpreter.

2 Likes

Alright, I understood. thanks for your advices. :man_bowing:

1 Like

maybe there is a way to load your c to java instead, but no idea if that would help. And might require installing it as a module

1 Like