.png)
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
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
.png)
Hi Developers!
This is the second post on the resources for Developers. This part is about Open Exchange
Using Open Exchange to Learn InterSystems
InterSystems Open Exchange is a applications gallery of tools, connectors, and libraries which InterSystems Developers submit to share the experience, approaches and do business. All the applications are either built with InterSystems data platforms or are intended to use for development with InterSystems data platforms.
If you are a beginner developer you can take a look at applications in Technology Example category. All the applications in this category come with open source code repositories, so you are able to run the samples and examples in a docker container with IRIS on your laptop or in the cloud IRIS sandbox. Examples:
Hello everyone,
Recently, I've been working on a Business Process that processes a large JSON FHIR message containing up to 50k requests in an array within the JSON.
Currently, the code imports the JSON as a dynamic object from the original message stream, obtains an iterator from it, and processes each request one at a time in a loop.
The performance meets the requirements, even with much larger requests than the one exposed above.
In InterSystems IRIS versions >=2021.2 we can use the accompanying irispython binary to directly write python code on top of our IRIS instances. This lets us use python packages, call methods, make SQL queries, and do nearly anything in Objectscript but pythonic.
For example, below I check if a namespace is present:
#!/usr/irissys/bin/irispython
import iris
# call arbitrary class methods
result = iris.cls('%SYS.Namespace').Exists('USER')
if result == 1:
print(f"Namespace USER is present")
But, what if my method in IRIS has special parameters such as
OutputandByRefparameters?
Pandas is not just a popular software library. It is a cornerstone in the Python data analysis landscape. Renowned for its simplicity and power, it offers a variety of data structures and functions that are instrumental in transforming the complexity of data preparation and analysis into a more manageable form. It is particularly relevant in such specialized environments as ObjectScript for Key Performance Indicators (KPIs) and reporting, especially within the framework of the InterSystems IRIS platform, a leading data management and analysis solution.
Hi,
I am using Windows 10 and I cannot find an installation source for the irisnative python library. I tried to install the wheel file provided by intersystems on github (https://github.com/intersystems/quickstarts-python/).
c:\wc\quickstarts-python\Solutions\nativeAPI_wheel>pip install irisnative-1.0.0-cp34.cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl
ERROR: irisnative-1.0.0-cp34.cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl is not a supported wheel on this platform.
Is irisnative supported on Windows 10 ? The purpose is to execute ObjectScript command from external python code.
Hi,
In my Iris Installation I cannot use python. When I try to install external libraries I get no OPENSSL_Applink:
$ pwd
/cygdrive/c/InterSystems/IRIS2/bin
$ ./irispip install --target ../Mgr/python/ pandas
OPENSSL_Uplink(00007FFBEC2F7068,08): no OPENSSL_Applink
I get the same error when I try to install a wheel file:
$ ././bin/irispip install ./intersystems_irispython-3.2.0-py3-none-any.whl
Processing c:\intersystems\iris2\dev\python\intersystems_irispython-3.2.0-py3-none-any.Hi,
I have over 36 years of experience developing solutions with MUMPS and Cache. Additionally, I also develop in Python and HTML.
I have no experience in Vista or PSL, but I would be very happy to have the opportunity to learn it. I'm looking for a job opportunity.
Best,
Carlos
We have a yummy dataset with recipes written by multiple Reddit users, however most of the information is free text as the title or description of a post. Let's find out how we can very easily load the dataset, extract some features and analyze it using features from OpenAI large language model within Embedded Python and the Langchain framework.
First things first, we need to load the dataset or can we just connect to it?
DNA Similarity and Classification was developed as a REST API utilizing InterSystems Vector Search technology to investigate genetic similarities and efficiently classify DNA sequences. This is an application that utilizes artificial intelligence techniques, such as machine learning, enhanced by vector search capabilities, to classify genetic families and identify known similar DNAs from an unknown input DNA.
.png)
K-mer Analysis: Fundamentals in DNA Sequence Analysis
Fragmentation of a DNA sequence into k-mers is a fundamental technique in genetic data processing.
This article introduces using the langchain framework supported by IRIS for implementing a Q&A chatbot, focusing on Retrieval Augmented Generation (RAG). It explores how IRIS Vector Search within langchain-iris facilitates storage, retrieval, and semantic search of data, enabling precise and up-to-date responses to user queries. Through seamless integration and processes like indexing and retrieval/generation, RAG applications powered by IRIS enable the capabilities of GenAI systems for InterSystems developers.
Hi, I need to use some pythonic library from cos.
To use them I need a python dict with some python object in it
Ex in python:
obj = pythonObject("value1")
dict = {object : obj ,key : "value2"}
result = pythonFunc(dict)To do that I first tried to pass by dynamic object, to later convert them in dict from Json. But unfortunately the dynamic object doesn't accept python object inside it. And my pythonic function need to have an instance of my python object.
Hello,
I would like you to propose this challenge.
It has been created by the CodeWars community here: https://www.codewars.com/kata/6523a71df7666800170a1954/python
I will copy and paste the description:
A number is Esthetic if, in any base from base2 up to base10, the absolute difference between every pair of its adjacent digits is constantly equal to 1.
Principle: After dividing the article uploaded by the user into sentences using Python, the embedded value is obtained and stored in the Iris database. Then, the similarity between sentences is compared through Iris vector search, and finally displayed on the front-end page.
The installation steps can be viewed in the readme file. It should be noted that the BERT model used in the example has some memory requirements. If there is a long-term stuck situation during the testing process, other models such as MiniLM (which is used in the online demo) can be considered.
BPL stands for Business Process Language.
This is an XML format for describing complex information orchestration interactions between systems.
InterSystems Integration engine has for two decades, provided a visual designer to build, configure, and maintain, BPL using a graphical interface.
Think of it like drawing a process flow diagram that can be compiled and deployed.

BPL components are added to Integration productions like any other built-in or custom business component.

With the advent of Embedded Python, a myriad of use cases are now possible from within IRIS directly using Python libraries for more complex operations. One such operation is the use of natural language processing tools such as textual similarity comparison.
Note: For this article, I will be using a Linux system with IRIS installed.
Hi Developers!
Here're the technology bonuses for the InterSystems Vector Search, GenAI, and ML contest 2024 that will give you extra points in the voting:
See the details below.

Hello everybody,
I've been experimenting with Embedded Python and have been following the steps outlined in this documentation: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
I'm trying to convert a python dictionary into an objectscript array but there is an issue with the 'arrayref' function, that is not working as in the linked example.
This is a snapshoot of my IRIS terminal:
USER>do ##class(%SYS.Python).Shell()
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4Hi,
I am using embeded python to utilize some pythonic library but i got a problem on my hand.
One of the python function i am using return multiple values
in python you would do something like that :
val1, val2, val3, = function(params)
In COS I got something like that :
lib = ##class(%SYS.Python).Import("lib")
val1 = lib.function(params)And I don't know how to get the second and third values.
Is there a way to get them?
Visual Studio Code releases new updates every month with new features and bug fixes, and the March 2024 release is now available.
Version 1.88 includes:
After running many tests to kick the tires calling Python from COS (which worked fine) in any directory, I encountered problems when trying to access Python libraries like Numpy from any OTHER namespace. I saw some other posts about this but the resolution seems unclear. When I run the test program method numpytest below in %SYS it works just fine. If i run the Python method in any other namespace I get:
PITT>do ##class(test.python).numpytest()
DO ##CLASS(test.python).
Using VECTOR_COSINE() in SQL query to perform a text similarity search on existing embeddings in a %VECTOR column.
Code is below.
Commented out sql query returns this error: SQLCODE: -29 Field 'NEW_EMBEDDING_STR' not found in the applicable tables^ SELECT TOP ? maxID , activity , outcome FROMMain .AITest ORDER BY VECTOR_COSINE ( new_embedding_str ,
Sql query as written returns ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'OSError'>: isc_stdout_write: PyArg_ParseTuple failed!
Hi, I am trying to use embedded python in a cache class, but I can only get it to work in the source code namespace.
We map our client namespaces to our source code namespaces using Default Database for Routines under System > Configuration > Namespaces > Edit Namespace in the management portal.
In the source code namespace:
SOURCENEW>w ##class(EF.helloWorld).helloWorldPython()
Hello World!
SOURCENEW>ZN "EVEXAMPLE"
In the client namespace:
EVEXAMPLE>w ##class(EF.helloWorld).helloWorldPython()
W ##CLASS(EF.helloWorld).
The objective of the article is to provide the reader with the following informations:
Schema of the article:

Hi all,
Does anybody have the same issue?
$ZF(-100) to run python script not work when directly execute in studio or in storedproc called by TrakCare, but can work when do in iris session.
The python script imports a "barcode" package. It seems that when directly execute in studio or in storedproc called by TrakCare, the package can not be imported.
s r = $ZF(-100,"/SHELL", "/usr/bin/python3.9","/trak/cnpubase/tc/webfiles/web/custom/CNPU/script/py/barcode/genslbarcodetest.py",keyStr,path)import sys
import barcode
from barcode.writer import ImageWriter
spn=sys.argv[1]
name=sys.Visual Studio Code releases new updates every month with new features and bug fixes, and the February 2024 release is now available.
Version 1.87 includes:
I am sending an httpRequest from ObjectScript to a python server. I am not receiving a response in OS
OS config On the client side
// Create an HTTP request object
Set httpRequest = ##class(%Net.HttpRequest).%New()
// Set the server URL
Set httpRequest.Server = "http://127.0.0.1:8080"
// Set content type to JSON
Set httpRequest.ContentType = "application/json"
// Clear any existing entity body"{""name"": ""Lowell Buschert"", ""dob"": ""1970-12-09"", ""address"": ""XXXXX""}"
do httpRequest.EntityBody.Clear()
//Set httpRequest.
Not so long ago, I came across the idea of using Python Class Definition Syntax to create IRIS classes on the InterSystems Ideas Portal. It caught my attention since integrating as many syntaxes as possible gives visibility to InterSystems’s products for programmers with experience in many languages.
The author of that idea pointed out the possibility of creating classes using Python’s syntax, in addition to the currently available ones on IRIS. This concept inspired me to write this article, exploring the possibilities of accessing the full InterSystems power employing only Python.
Hello Community,
SQL language remains the most practical way to retrieve information stored in a database.
The JSON format is very often used in data exchange.
It is therefore common to seek to obtain data in JSON format from SQL queries.
Below you will find simple examples that can help you meet this need using ObjectScript and Python code.
ObjectScript : using Dynamic SQL with %SQL.