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.
Introduction
Accessing Amazon S3 (Simple Storage Service) buckets programmatically is a common requirement for many applications. However, setting up and managing AWS accounts is daunting and expensive, especially for small-scale projects or local development environments. In this article, we'll explore how to overcome this hurdle by using Localstack to simulate AWS services. Localstack mimics most AWS services, meaning one can develop and test applications without incurring any costs or relying on an internet connection, which can be incredibly useful for rapid development and debugging. We used ObjectScript with embedded Python to communicate with Intersystems IRIS and AWS simultaneously.Before beginning, ensure you have Python and Docker installed on your system. When Localstack is set up and running, the bucket can be created and used.
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.
Setting up Embedded Python to Use the Sentence Transformers Library
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:
- Vector Search usage - 5
- IntegratedML usage - 3
- Embedded Python - 3
- LLM AI or LangChain usage: Chat GPT, Bard, and others - 3
- Questionnaire - 2
- Docker container usage - 2
- ZPM Package deployment - 2
- Online Demo - 2
- Implement InterSystems Community Idea - 4
- Find a bug in Vector Search, or Integrated ML, or Embedded Python - 2
- First Article on Developer Community - 2
- Second Article On DC - 1
- First Time Contribution - 3
- Video on YouTube - 3
- Suggest a new idea - 1
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##classIt seems that the 'arrayref' function is not recognized within the 'iris' module.
Hi,
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?
I recently had the need to monitor from HealthConnect the records present in a NoSQL database in the Cloud, more specifically Cloud Firestore, deployed in Firebase. With a quick glance I could see how easy it would be to create an ad-hoc Adapter to make the connection taking advantage of the capabilities of Embedded Python, so I got to work.
Preparing the environment
To start, we need an instance of the database on which we can perform the tests. By accessing the Firebase console, we have created a new project to which we have added the Firestore database.
.png)
As you have seen in the latest community publications, InterSystems IRIS has included since version 2024.1 the possibility of including vector data types in its database and based on this type of data vector searches have been implemented. Well, these new features reminded me of the article I published a while ago that was based on facial recognition using Embedded Python.
Introduction
For those of you who don't remember what that article was about, it is linked at the end of this article.
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).
Hi All,
On February 8, 2024, we asked for input from the IRIS community regarding exam topics for our InterSystems IRIS Developer Professional exam. We will close the window for providing feedback on the exam topics on Friday, March 8, 2024. If you would like to have your say in what topics are covered on the exam, this is your last chance!
How can I access the survey?
Nowadays so much noise around LLM, AI, and so on. Vector databases are kind of a part of it, and already many different realizations for the support in the world outside of IRIS.
Why Vector?
- Similarity Search: Vectors allow for efficient similarity search, such as finding the most similar items or documents in a dataset. Traditional relational databases are designed for exact match searches, which are not suitable for tasks like image or text similarity search.
- Flexibility: Vector representations are versatile and can be derived from various data types, such as text (via embeddings like Word2Vec, BERT), images (via deep learning models), and more.
- Cross-Modal Searches: Vectors enable searching across different data modalities. For instance, given a vector representation of an image, one can search for similar images or related texts in a multimodal database.
And many other reasons.
So, for this pyhon contest, I decided to try to implement this support. And unfortunately I did not manage to finish it in time, below I'll explain why.

Hello Everyone,
The Certification Team of InterSystems Learning Services is developing an InterSystems IRIS Developer Professional certification exam, and we are reaching out to our community for feedback that will help us evaluate and establish the contents of this exam.
Note: This exam will replace the current InterSystems IRIS Core Solutions Developer Specialist exam when it is released. Please note from the target role description below that the focus of the new exam will be more on developer best practices and a lot less on the ObjectScript programming language.
How do I provide my input?
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.Statement
The architect of the JSON schema (MS) asked if IRIS could perform schema validation. I asked on Discord objectscript channel how we could validate a Dynamic Object against a JSON schema. Dmitry Maslennikov replied that probably the easiest way would be to use python, but it would require converting ObjectScript JSON to Python dict.
I refer to this as my first real use case for Embedded Python, because previous examples I had tried I could have implemented in ObjectScript just as easily as in Python.
Hi,
I'm trying to access to my datas stored in a RecordMap from SQLAlchemy, and I need to access to any tables already created before using SQLAlchemy.
Here is some part of my code :
TestBase:
classTestBase(DeclarativeBase)Engine creation and entities binding :
bases = {
"TEST"create_engine_and_sessionMy RecordMap entity :
class"extend_existing"Each part of my code are in different files, the "User_BastideRecord.
Embedded Python is about to get a whole lot more powerful, and we’re looking for a few volunteers to give it a try.
What’s the Flexible Python Runtime?
The Flexible Python Runtime option allows you to use a Python runtime of your choosing with Embedded Python. Previous to this, you could only use the operating system's default Python, which was limiting especially for customers using the latest and greatest AI & ML tools close to their data.
When InterSystems introduced Embedded Python in InterSystems IRIS in 2021.
Hey Developers,
Start watching the new video on InterSystems Developers YouTube:
⏯ Using Embedded Python as a Jupyter Notebook Server @ Global Summit 2023
While starting the development with IRIS we have a distribution kit or in case of Docker we are pulling the docker image and then often we need to initialize it and setup the development environment. We might need to create databases, namespaces, turn on/off some services, create resources. We often need to import code and data into IRIS instance and run some custom code to init the solution.
And there plenty of templates on Open Exchange where we suggest how to init REST, Interoperability, Analytics, Fullstack and many other templates with ObjectScript. What if we want to use only Python to setup the development environment for Embedded Python project with IRIS?
So, the recent release of Embedded Python template is the pure python boilerplate that could be a starting point for developers that build python projects with no need to use and learn ObjectScript. This article expresses how this template could be used to initialize IRIS. Here we go!
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:
```
<THROW> *%Exception.PythonException <THROW> 230 ^^0^DO ##CLASS(python.openaiUtils).Test() <class 'ModuleNotFoundError'>: No module named 'tiktoken.
It's true! QuinielaML has incorporated the most important leagues in Europe (and Brazil) into its prediction service, so, dear members of the Developer Community, wherever you are from, you will be able to have the predictions of your favorite leagues at your disposal.
.png)
MIRROR is the best solution for almost immediate replications to a Failover Server.
The related mechanics are based on Global Journaling.
Globals hold Data and Classes and Routines and more ...
If Mirroring is in place all is in sync. With minimum delays
This is of course rather useful for code changes in Classes, Routines, ....
To what extent is Embedded Python covered by Mirroring?
Or:
What is required to Synchronize EmbeddedPython like Mirroring.
With ECP we have the option to have a collection of Frontend instances
All Frontend servers typically have a common Master in the background
Concentrating data on the Master server is the primary goal.
As a side effect, this applies also to Classes, Routines, .. anything stored in Globals.
This is probably not the most efficient setup. But rather common anyhow.
Is embedded Python code also stored in Globals?
What is the recommended solution for a similar installation?
Hi everyone,
I'm attempting to compile a basic Python code on a remote server, but it appears that the compiler doesn't recognize the language.
The remote server is running a virtual machine with Oracle Linux Server 7.9 (64-bit), and it has IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2021.1 (Build 215U) [HealthConnect:3.3.0] installed.
When I try to compile a script that includes a Python ClassMethod, such as this "testpy.
Introduction
Data analytics is a crucial aspect of business decision-making in today's fast-paced world. Organizations rely heavily on data analysis to make informed decisions and stay ahead of the competition. In this article, we will explore how data analytics can be performed using Pandas and Intersystems Embedded Python. We will discuss the basics of Pandas, the benefits of using Intersystems Embedded Python, and how they can be used together to perform efficient data analytics.
.png)
Hi Community,
.png)
to learn quickly and in total autonomy on IRIS, I offer you some links which can help you in this beautiful bicycle ride rich in discoveries:
Hi folks
I want to tell you how you can make your own assistant based on IRIS and OpenAI (perhaps you can then move to your own AI models)

This is the first time I have fully tried developing an application for IRIS and I want to point out steps that may also be useful to you
- Deploy to google cloud via github workflows (One container with an IRIS database and a web server in Python (flask)) and placing secrets inside the application not through an environment variable
- Record audio from the browser and send to the server
- Launching cron jobs via the ZPM module
- Integration with OpenAi
First, about the application itself
You can try it using the link and see how it works - https://iris-recorder-helper.demo.community.intersystems.com/
Hi Developers!
Here is the bonus results for the applications in InterSystems Python Programming Contest 2023:
In the ever-evolving landscape of data science and machine learning, having the right tools at your disposal can make all the difference. In this article, we want to shine a spotlight on two essential Python libraries that have become indispensable for data scientists and machine learning practitioners alike: Matplotlib and scikit-learn.
Matplotlib: Crafting Visualizations with Precision
Matplotlib is a versatile and powerful library for creating static, animated, and interactive visualizations in Python.
.png)
Hi Community
In this article, I will introduce my application IRIS-GenLab.
IRIS-GenLab is a generative AI Application that leverages the functionality of Flask web framework, SQLALchemy ORM, and InterSystems IRIS to demonstrate Machine Learning, LLM, NLP, Generative AI API, Google AI LLM, Flan-T5-XXL model, Flask Login and OpenAI ChatGPT use cases.