Python is an interpreted high-level programming language for general-purpose programming. Created by Guido van Rossum and first released in 1991, Python has a design philosophy that emphasizes code readability, notably using significant whitespace
I was wondering what best practice was for using macros in Embedded Python, i.e. iris.execute('$$$MACRO()') or something else. Does anyone have insight into this?
I'm exploring this right now: given a bunch of types defined as Pydantic models, how can I come up with an equivalent %RegisteredObject/%SerialObject and convert to/from (e.g., to support persistence and match validation as much as possible)?
People who know Python better than I do (e.g., your average undergraduate from this decade): is this a stupid idea or a cool idea? Has anyone else done this before?
I'm trying to create an indexed table with an vector field so I can search by the vector value. I've been investigating and found that to get the vector value based on the text (token), use a Python method like the following:
When setting up a new web app in iris (iris is in a container) iris complains that a WSGI framework is not installed. I have installed python into the container as well as both flask and django via the python virtual environment (see second screenshot) and the python language server is running
Is this the wrong way to install flask? How do I get the container version to recoginize that flask is installed?
Hi, I'm trying to use the iris python package to create a connection to and Iris Health instance (Docker Container), but getting and error. I can login to the instance using the UI with the same uname/password but unable to create the python connection. Any suggestions?
I'm getting an unexpected behavior when using pandas function to_sql(), which uses sqlalchemy-iris. After the first execution, a transaction seems to be opened and all rows inserted are lost after closing the connection:
If anyone has experience debugging Embedded Python or has insight into why an ObjectScript method when called from a Python method would not work but would work when called directly via ObjectScript or in a Python shell, your help would be appreciated!
We have an ObjectScript ClassMethod called GetTemplateString() which takes in a templateName of String type and uses the template name to get the template object, access the Code, and read the code into a templateString. The string version of the Code is returned.
How to convert the IRIS %DynamicArray into python list. I got " <THROW>TestDyncArray+1^MyLearn.Pyth.NewClass1.1 *%Exception.PythonException <PYTHON EXCEPTION> 246 <class 'AttributeError'>: <unknown exception data>" error when passing array values to python class.
When registering the components: I used this command: "Utils.migrate("/external/src/CoreModel/Python/settings.py)" ; The error appears: "An error has occurred: iris.cls: error finding class", I changed with these two lines: result = subprocess.run(["iop", "-m", "/external/src/CoreModel/Python/settings.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) subprocess.run(["iop", "-m", "/external/src/CoreModel/Python/settings.py"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)