Robert Cemper · Feb 8, 2021 3m read
WebSocket Client with embedded Python

This is a demo to make use of a simple WebSocket Client with Embedded Python in IRIS.

To continue my series of WebSocket Client I have added an example written in Python.
The most impressive experience was how easy the writing and testing of the client was
which happened total offline from IRIS.
Embedding, running and feeding the client with data from IRIS was also incredibly simple.

9 6
0 535

I have done Python - Cache binding setup following the guide from I have also run from sample3 folder and it able to run and complete successfully.

However, when I try to run the same code via $zf, it gives error with exit code 1.

I've tried running help("intersys.pythonbind3") via $zf and also running from Cache terminal as follows:

0 6
0 576


I believe that the Perl and Python bindings that exist on Cache / Ensemble do not exist on IRIS for Health 2020.1 ... is that correct?

Is there any similar documentation and samples (like below) , that show an example of how to run a basic Perl or Python script that connects with ODBC or whatever the recommended way?

0 6
0 115

I am writing a Python tool to query our cache instances for various information. I have set up the connection without issue:

import intersys.pythonbind3 as pyb

conn = pyb.connection()

db = pyb.database(conn)
qry = pyb.query(db)
obj = pyb.object(db)

I wanted to make the call:

execRes = qry.prepare_class("SYS.Database",'FreeSpace')

But fetching fails because of data mismatches ( as I understand from other posts) and my testing bears out this type of failure.

0 6
0 103

Hi Developers,

Please welcome the new video specially recorded by InterSystems Product Manager @Bob Kuszewski for the 3rd InterSystems Online Programming Contest on InterSystems IRIS Native API:

Using the IRIS Native API GitHub Template

What’s the contest about?

In the last year, InterSystems added and expanded Native APIs for Java, .NET, Python, and Node.js. The Native API provides high speed access to globals, the ability to instantiate and use ObjectScript objects, and fine-grained control over transactions.

1 6
0 383

I have table

        name VARCHAR(50) NOT NULL, 
        parent VARCHAR(50), 
        PRIMARY KEY (name), 
        FOREIGN KEY(parent) REFERENCES nodes (name) ON UPDATE cascade

I put some data

INSERT INTO nodes (name, parent) VALUES ('n1', NULL);
INSERT INTO nodes (name, parent) VALUES ('n11', 'n1');
INSERT INTO nodes (name, parent) VALUES ('n12', 'n1');
INSERT INTO nodes (name, parent) VALUES ('n13', 'n1');

Let's delete all


Nope, no way.

SQL Error [124] [S1000]: [SQLCODE: <-124>:<FOREIGN KEY constraint failed referential check upon DELETE of row in referenced table>]
[Location: <ServerLoop>]
[%msg: <At least 1 Row exists in table 'SQLUser.nodes' which references key 'NODESPKey2' - Foreign Key Constraint 'NODESFKey3', Field(s) 'parent' failed on referential action of NO ACTION>]

0 6
0 213


What is the Python syntax I can use from a ClassMethod (developed in an IRIS using embedded Python), in order to invoke another class method,

- in the same class; and

- in another class.

I see 'self' is synonymous to use $this (..) in ObjectScript, but these are ClassMethods I am invoking, and self did not seem to work.

thanks - Steve

1 5
0 212

Hi Community!

This week is a voting week for the InterSystems IRIS Native API Programming Contest! We have 8 applications — so you have a set of applications to choose from!

How to vote? This is easy: you will have one vote, and your vote goes either in Experts Nomination or in Community Nomination.

1 5
1 291

Hi developers!

Recently we announced the preview of Embedded Python technology in InterSystems IRIS.

Check the Sneak Peak video by @Bob Kuszewski.

Embedded python gives the option to load and run python code in the InterSystems IRIS server. You can either use library modules from Python pip, like numpy, pandas, etc, or you can write your own python modules in the form of standalone py files.

So once you are happy with the development phase of the IRIS Embedded Python solution there is another very important question of how the solution could be deployed.

One of the options you can consider is using the ZPM Package manager which is described in this article.

2 5
0 619

1. interoperability-embedded-python

This proof of concept aims to show how the iris interoperability framework can be use with embedded python.

1.1. Table of Contents

1.2. Example

import grongier.pex
import iris
import MyResponse

class MyBusinessOperation(grongier.pex.BusinessOperation):

    def OnInit(self):
        print("[Python] ...MyBusinessOperation:OnInit() is called")
        self.LOGINFO("Operation OnInit")

    def OnTeardown(self):
        print("[Python] ...MyBusinessOperation:OnTeardown() is called")

    def OnMessage(self, messageInput):
        if hasattr(messageInput,"_IsA"):
            if messageInput._IsA("Ens.StringRequest"):
                self.LOGINFO(f"[Python] ...This iris class is a Ens.StringRequest with this message {messageInput.StringValue}")
        self.LOGINFO("Operation OnMessage")
        response = MyResponse.MyResponse("...MyBusinessOperation:OnMessage() echos")
        return response

1.3. Regsiter a component

No ObjectScript code is needed.

7 5
1 1,162

Apache Spark has rapidly become one of the most exciting technologies for big data analytics and machine learning. Spark is a general data processing engine created for use in clustered computing environments. Its heart is the Resilient Distributed Dataset (RDD) which represents a distributed, fault tolerant, collection of data that can be operated on in parallel across the nodes of a cluster. Spark is implemented using a combination of Java and Scala and so comes as a library that can run on any JVM.

11 5
0 2,360
Oleh Dontsov · Jun 4, 2020 1m read
Easy data import into IRIS

Sometimes you need quickly and easily import data into IRIS. For this, an IRIS import manager has been developed.

This application allows you to import JSON data and also provides a really simple interface for transferring data from MongoDB collections to IRIS globals. It has never been so easy.

Let's look at examples.

Import JSON

2 5
0 392

Hi folks!

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().

Compare ObjectScript:

do ..SetupGame()

and the same call in EmbeddedPython:



0 5
0 100

I am demonstrating a use case of how we can create an IRIS Interoperability Production for special use in an external language. InterSystems IRIS, within Interoperability has a framework called Production Extension (PEX), using which we can create productions and program them as per their purpose using external languages like Java, Python etc, and also develop custom inbound and outbound adapters to communicate with other applications.

6 5
0 118
Marlin Mixon · Nov 4, 2021
IRIS Language Bridge Python

At the recent virtual conference I saw the demonstration on being able to run Python within ObjectScript and run ObjectScript within Python thanks to a feature called Language Bridge. Is this available now? If so, am I able to install it? I am currently running HealthShare 2020.1. I have a little bit of experience using Irisnative with Python but was intrigued with the more seamless-looking features offered by the Language Bridge.

Thanks for any insight.

Marlin Mixon

1 5
0 211
   _________ ___ ____  
  |__  /  _ \_ _|  _ \ 
    / /| |_) | || |_) |
   / /_|  __/| ||  __/ 
  /____|_|  |___|_|    

Starting in version 2021.1, InterSystems IRIS began shipping with a python runtime in the engine's kernel. However, there was no way to install packages from within the instance. The main draw of python is its enormous package ecosystem. With that in mind, I introduce my side project zpip, a pip wrapper that is callable from the iris terminal.

5 5
1 180

I am in the process of creating a python report writer that includes the information contained in "License Usage" page of the management portal. I think I have a handle on the local values contained in the report using the %SYSTEM.License class I have those defined using these methods:

Current License Units Used - -> LUConsumed

Maximum License Units Used --> LUMaxConsumed

License Units Enforced --> KeyEnforcedUnits

License Units Authorized --> KeyLicenseUnits

0 5
0 220


I was playing around with the python binding for caché (2018.1.4) and I ran into some problems.

When executing the class query "List" from SYS.Database the pythonbind interface throws an exception, that seems to be caused by a mismatch of the defined SQL datatypes for this query and what is actually returned (or the lack of type conversion in the pythonbind interface).

Is this a known issue ? Are there solutions/workarounds for this,
Or is this a bug ?

The details:

0 4
0 284

This is the first article of a series diving into visualization tools and analysis of time series data. Obviously we are most interested in looking at performance related data we can gather from the Caché family of products. However, as we'll see down the road, we are absolutely not limited to that. For now we are exploring python and the libraries/tools available within that ecosystem.

9 4
1 1,367

ObjectScript Kernel Logo
Jupyter Notebook is an interactive environment consisting of cells that allow executing code in a great number of different markup and programming languages.

To do this Jupyter has to connect to an appropriate kernel. There was no ObjectScript Kernel, that is why I decided to create one.

You can try it out here.

Here's a sneak peek of the results:

10 4
3 586

Following this GitHub we will see how the FIX protocol can be implemented easily using IRIS and Python.

If you don't have much time focus on the Send a Quote before the Order part near the end, as it will, in a matter of minute, tell you how to send a Quote Request followed by an Order Request and show you the result from the server, and that in no more than five clicks.

9 4
0 323