#Embedded Python

4 Followers · 292 Posts

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.

Documentation.

Article Yuri Marx · Jan 31, 2022 8m read

From IRIS 2021.2 is possible write Class Methods using the Python Language. I used this new feature to detect persons and objects into images, using ImageAI (https://github.com/OlafenwaMoses/ImageAI). The ImageAI creator defines it as: "An open-source python library built to empower developers to build applications and systems with self-contained Deep Learning and Computer Vision capabilities using simple and few lines of code." In this article you will learn how to apply AI Computer Vision to detect object and persons inside images.

Steps to analyze images using ImageAI

  1. Go to https://open

Request Image Analysis output


0
2 374
Question Steve Pisani · Jan 29, 2022

Hi,

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

5
0 838
Article José Pereira · Jan 13, 2022 2m read

I'd like to share an example on how the new Embedded Python feature in IRIS helped me in my daily routines.

While I’m participating in the iris-kaggle-socrata-generator project with Henrique Dias, I got to unzip datasets from Kaggle in order to import them.

Such a task was easily achieved by using the zipfile lib in Python (this code was copied from this stackoverflow):

Method UnZip(pZipFileName As %String, pExtractToDir As %String) As %DynamicArray [ Language = python ]
{
    import zipfile
    import iris
    with zipfile.ZipFile(pZipFileName, 'r') as zip_ref:
        zip_ref.extractall(pExt
2
0 1007
Announcement Bob Kuszewski · Oct 28, 2021

Welcome to day 3 of Virtual Summit 2021!  We have incredible content available to you this year and I'd just like to bring your attention to the 4(!) sessions that we have on Embedded Python.

14
3 1034
Announcement Evgeny Shvarov · Jul 6, 2021

Hi Developers!

Here're the technology bonuses for the InterSystems IRIS AI contest that will give you extra points in the voting.

IntegratedML usage - 4 points

Use InterSystems IntegratedML in you AI/ML solution. Here is the template that uses it.

Be sure that the IRIS version is not less than 2021. The latest ML images with ZPM are:

intersystemsdc/iris-ml-community:2021.1.0.215.0-zpm
intersystemsdc/irishealth-ml-community:2021.1.0.215.0-zpm

R Gateway and Python gateway usage - 4 points

InterSystems IRIS 2021 release contains two new features - R gateway and Python gateway. Here is the template on how to use the R gateway. Here is a short demo of how to use it.

Embedded Python usage - 4 points

Embedded Python is a very new feature of InterSystems IRIS that gives you the option to use python as a "first-class citizen" in backend business logic development with InterSystems classes. Short demo of Embedded Python.

Embedded python could be used in "on-demand" images that could be delivered via InterSystems Early Access Program (EAP) if you refer to python-interest@intersystems.com.

Here is the template package on how to use Embedded Python deployable with ZPM. Don't forget to change the image to the one you get from the Early Access program.

PMML usage - 4 points

PMML  - Predictive Modelling Markup Language - can be used to build AI/ML solutions with InterSystems IRIS. Check with documentation.

There is an example in Open Exchange on how to use PMML.

0
0 366
Announcement Anastasia Dyubaylo · Jul 5, 2021

Hey Developers,

We have some good news for you:

💥 InterSystems AI contest participants can use Embedded Python in their solutions! So if you are not yet a member of the Embedded Python Early Access Program (EAP), now is the time! 

Refer to python-interest@intersystems.com and you'll get FREE access to the InterSystems IRIS Embedded Python features.

In addition, we invite all EAP participants to the special Embedded Python kick-off webinar tomorrow, July 6 at 10:00 AM EDT – an easy start on how to use Embedded Python! Demonstration of the new features of the data platform, examples applications, and of course rewards. 

After you become an EAP member, you will receive a special link to join the kick-off webinar:

➡️ RSVP: python-interest@intersystems.com

1
0 355
Announcement Anastasia Dyubaylo · Jun 22, 2021

Hi Community,

We're pleased to invite all the developers to the upcoming InterSystems AI Contest Kick-Off Webinar! The topic of this webinar is dedicated to the InterSystems AI programming contest.

During the webinar, we will demo how to load data into IRIS, how to deal with it using ODBC/JDBC and REST, and how to use special AI/ML features of IRIS: IntegratedML, DataRobot, R Gateway, Embedded Python, PMML.

Date & Time: Monday, June 28 — 11:00 AM EDT

Speakers:  
🗣 @Aleksandar Kovacevic, InterSystems Sales Engineer
🗣 @Théophile Thierry, InterSystems Intern
🗣 @Bob Kuszewski, Product Manager - Developer Experience, InterSystems  
🗣 @Evgeny Shvarov, InterSystems Developer Ecosystem Manager

1
0 428
Announcement Bob Kuszewski · Jun 14, 2021

We’re looking for Python developers to participate in our Embedded Python Early Access Program!  If you (or someone you know) are a Python developer and are interested, please contact us via the email address below.

InterSystems is bringing the power and simplicity of Python to IRIS.  We’re hard at work integrating Python directly into the IRIS kernel, making it a full peer to ObjectScript.

  • Use any of thousands of pre-built Python libraries
  • Easy access to IRIS from Python, and Python from ObjectScript
  • Mixed ObjectScript and Python classes

The Early Access Program is a way for you to h

0
0 556
Article Evgeny Shvarov · Feb 9, 2021 3m read

Hi developers!

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

Check the Sneak Peak video by @Robert.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.

5
0 1044
Article Robert Cemper · Feb 8, 2021 2m read

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

How to Test it

  • Run an Iris Session in Docker
  • Select your WebSocket Echo Server
  • Enter the text you want to send or generate it
  • Send it and see the result
$ docker-compose exec iris iris session iris "##class(rccpy.WSockPy).Run()"

*** Welcome to WebSocket Embedded Python Demo ***

Collecting websocket-client
Using cached https://files.pythonhosted.org/packages/4c/5f/f61b420143ed1c8dc69f9eaec5ff1ac36109d52c80de49d66e0c36c3dfdf/websocket_client-0.57.0-py2.py3-none-any.whl
Collecting six (from websocket










0
0 942
Article José Pereira · Feb 2, 2021 12m read

Image search like Google's is a nice feature that wonder me - as almost anything related to image processing.

A few months ago, InterSystems released a preview for Python Embedded. As Python has a lot of libs for deal with image processing, I decided to start my own attemptive to play with a sort of image search - a much more modest version in deed :-)


---

A tast of theory 🤓

In order to do an image search system, fist it's necessary select a set of features to be extracted from images - these features are also called descriptors. The range of each component of this descriptors creates a so




0
0 442
Article Robert Cemper · Jan 19, 2021 2m read

This is a first attempt to use Embedded Python in IRIS
The Python code is adapted from solutions for Advent of Code 2020 contest.
Test data are all input to my personal challenge.

Prerequisites

Make sure you have git and Docker desktop installed.

Installation

Clone/git pull this repo into any local directory

$ git clone https://github.com/rcemper/try_embedded_python  

Open the terminal in this directory and run:

$ docker-compose build

this may take some time to complete

Run the IRIS container with this project:

$ docker-compose up -d

How to Test it

Using IRIS terminal:

$ docke


0
1 1233