Embedded Python refers to the integration of the Python programming language into the InterSystems IRIS kernel, allowing developers to operate with data and develop business logic for server-side applications using Python.
My general question is how to convert to a %Library.ListOfObjects to a Python "array-like" structure for use in Matplotlib.
Specifically, I have a Line Object which is comprised of a list of Points (see classes below). I want to pass the line to Python to create a Matplotlib Path.
Hi all, I am trying to execute a query like the below code. set statement = ##class(%ResultSet).%New("some_class:query_method"). // here query method is empty and with rowspec some columname
statement.Execute(param1)
I want to fetch data type of column value returned from above. eg - Name - VARCHAR, amount - INTEGER etc. How can I get it. Or if not possible directly. Is there any other way to validate or get datatype of values returned. Line we have type() in python3
We're having a problem with the way Python modules are being cached in Iris. If we modify some code and then reimport a module it is still processing the old code.
Those who code IRIS solutions in VSCode using Docker often use the convenient ObjectScript menu, which contains links to Management Portal, Class Reference, Unittest portal, Productions, etc.
While drilling down to a Dev Container to code Embedded Python there is no such option, at least within my settings:
How can I refer to a classmethod of the same class while coding another classmethod with Embedded python?
I know that I can call it with iris.cls(classname).MethodName(), but it's more cumbersome even comparing with ObjectScript, where I can call ..MethodName().
Has anyone come across a good using Embedded Python to convert a Python List object to an IRIS %List object?
My use case is I want to open an SQL entry with an Objectscript class method, then pass some information from that row into a separate Python class method which will then create a Python List object, then have the Python class method return that list back to the Objectscript class method in such a way that the Python List can be converted to an IRIS %List object for me to then use in the Objectscript code.
I'm currently facing an issue with a Python script in my IRISHealth environment and would appreciate your insights.
I've written a class method, `getTokenCount`, in Python, which uses the `tiktoken` module. However, when I run the script in the terminal using `do ##class(python.openaiUtils).getTokenCount("")`, I encounter the following error:
I copied a 5 MB messages.log file to AWS where I have iris-log-viewer app deployed. I ran the test to see how it takes in IRIS code to import the lines into a persistent table: