#Python

0 Followers · 456 Posts

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

Official site.

InterSystems Python Binding Documentation.

Article Murray Oldfield · Sep 24, 2024 7m read

Problems with Strings

I am accessing IRIS databases with JDBC (or ODBC) using Python. I want to fetch the data into a pandas dataframe to manipulate the data and create charts from it. I ran into a problem with string handling while using JDBC. This post is to help if anyone else has the same issues. Or, if there is an easier way to solve this, let me know in the comments!

I am using OSX, so I am unsure how unique my problem is. I am using Jupyter Notebooks, although the code would generally be the same if you used any other Python program or framework.

The JDBC problem

0
0 0
Article Steve Pisani · Mar 13, 2024 5m read

A customer recently asked if IRIS supported OpenTelemetry as they where seeking to measure the time that IRIS implemented SOAP Services take to complete. The customer already has several other technologies that support OpenTelemetry for process tracing.  At this time, InterSystems IRIS (IRIS) do not natively support OpenTelemetry.  

2
1 696
Article Ashok Kumar T · Sep 12, 2024 7m read

Hello Community,

In this article, I will outline and illustrate the process of implementing ObjectScript within embedded Python. This discussion will also reference other articles related to embedded Python, as well as address questions that have been beneficial to my learning journey.

As you may know, the integration of Python features within IRIS has been possible for quite some time. This article will focus on how to seamlessly incorporate ObjectScript with embedded Python.

0
0 0
Article Vladimir Prushkovskiy · Feb 26, 2024 6m read

In today's data landscape, businesses encounter a number of different challenges. One of them is to do analytics on top of unified and harmonized data layer available to all the consumers. A layer that can deliver the same answers to the same questions irrelative to the dialect or tool being used. InterSystems IRIS Data Platform answers that with and add-on of Adaptive Analytics that can deliver this unified semantic layer. There are a lot of articles in DevCommunity about using it via BI tools. This article will cover the part of how to consume it with AI and also how to put some insights

1
0 456
Question David.Satorres6134 · Sep 2, 2024

Hello,

I've recently updated the python version of a linux server running Red Hat Enterprise Linux 8.10 (Ootpa). We have an instance 2023.1 running there, and whenever I run the $System.Pyhthon.Shell() I can see it's still pointing to the old version. From within linux, it runs the latest one (we've change all the links to the new 3.11, so no scripts are broken).

So I guess the problem comes from the fact irispython is still compiled using old python version. So, how can I do to force IRIS to use the current version on the server, or update the irispython file?

Thanks!

0
0 0
Article Ashok Kumar T · Sep 2, 2024 4m read

In the preceding section, we explored the installation process and initiated the writing of the IRIS in native Python. We will now proceed to examine global traversal and engage with IRIS class objects.

 get: this function is used to get values from the traversal node.

deftraversal_firstlevel_subscript():"""
    ^mygbl(235)="test66,62" and ^mygbl(912)="test118,78"
    """for  i in irispy.node('^mygbl'):
        print(i, gbl_node.get(i,''))

 

node and items: single level traversal with node and get the values same as $Order(^mygbl(subscript), direction, data)

0
0 0
Article Yuri Marx · Sep 13, 2022 3m read

Samba is the standard for file services interoperability across Linux, Unix, DOS, Windows, OS/2 and other OS. Since 1992, Samba has provided secure, stable and fast file services for all clients (OS and programs) using the SMB/CIFS protocol. Network administrators have used SAMBA to create shared network folders to allow company employees to create, edit and view corporate files as if they were on their computers locally, when these files are physically located on a network file server. It is possible to create a network folder in Linux and see it as a shared folder in Windows, for example. 

1
2 1743
Article Mihoko Iijima · Feb 23, 2024 5m read

I have challenged to create a bot application using Azure Bot that can retrieve and post data to IRIS for Health.

 

A patient's data has already been registered in the FHIR repository of IRIS for Health.

The patient's MRN is 1001. His name is Taro Yamada. (in Japanese :山田 太郎)

This bot can post new pulse oximeter readings as an observation resource linked to the patient.

1
0 443
Question Hannah Sullivan · Aug 14, 2024

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.

0
0 0
Article Guillaume Rongier · Jul 26, 2024 5m read

It's been a long time since I didn't write an update post on IoP.

So what's new since IoP command line interface was released?

Two new big features were added to IoP:

  • Rebranding: the grongier.pex module was renamed to iop to reflect the new name of the project.
  • Async support: IoP now supports async functions and coroutines.

Rebranding

The grongier.pex module was renamed to iop to reflect the new name of the project.

The grongier.pex module is still available for backward compatibility, but it will be removed in the future.

Async support

0
0 0
Article Eric Mariasis · Jul 23, 2024 1m read

I implemented a Python Flask application for the 2024 Python Contest with a page that provides common form fields for an outgoing email such as the To and CC fields. And it lets you input a message as well as uploading text based attachments.
Then using LlamaIndex in Python, the app analyzes the content you put in and returns to you in a result box if there is anything that should stop you from sending that email.
Take a look at the Github repo here.

0
0 0
Article Zeljko Sucic · Jul 26, 2024 7m read

As a part of the IRIS Python 2024 contest, my colleague Damir and I went with an idea to build a platform called ShelterShare for connecting victims and volunteers for shelter requests . To do so we chose django as a framework and proceeded to build the first version with 3 different docker containers, django, iris and nginx which would then utilize IRIS as a pure Database engine via the beautifly composed django_iris (cudos to Dimitry). As we were progressing fast, we decided to explore the option of running it within the same container as IRIS by utilizing WSGI added in 2024.1. We knew ahead

0
0 0
Question Ashok Kumar T · Aug 4, 2024

Hello Community,

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.

ClassMethod TestDyncArray()
{
	Do..DyncArrayInPy([1,2,3,4])
}

ClassMethod DyncArrayInPy(numbers) [ Language = python ]
{
	import iris
	print(type(numbers)) ;<class 'iris.%Library.DynamicArray'> need to be a <class 'list'>for num in numbers:
		print(num)
}

Thanks!

0
0 0
Article Henry Pereira · Aug 1, 2024 4m read

Frontend development can be a daunting, even nightmarish, task for backend-focused developers. Early in my career, the lines between frontend and backend were blurred, and everyone was expected to handle both. CSS, in particular, was a constant struggle; it felt like an impossible mission.

Although I enjoy frontend work, CSS remains a complex challenge for me, especially since I learned it through trial and error. The meme of Peter Griffin struggling to open blinds perfectly captures my experience of learning CSS. Peter Griffin CSS

0
0 0
Article Alex Alcivar · Jul 27, 2024 7m read

I received some really excellent feedback from a community member on my submission to the Python 2024 contest. I hope its okay if I repost it here:

you build a container more than 5 times the size of pure IRIS

and this takes time

container start is also slow but completes

backend is accessible as described

a production is hanging around

frontend reacts

I fail to understand what is intended to show

the explanation is meant for experts other than me

The submission is here: https://openexchange.intersystems.com/package/IRIS-RAG-App

0
0 0
Article Maxim Gorshkov · Feb 14, 2024 4m read

The invention and popularization of Large Language Models (such as OpenAI's GPT-4) has launched a wave of innovative solutions that can leverage large volumes of unstructured data that was impractical or even impossible to process manually until recently. Such applications may include data retrieval (see Don Woodlock's ML301 course for a great intro to Retrieval Augmented Generation), sentiment analysis, and even fully-autonomous AI agents, just to name a few!

2
0 754
Article Muhammad Waseem · Sep 21, 2023 7m read

Hi Community,
In this article, I will demonstrate below steps to create your own chatbot by using spaCy (spaCy is an open-source software library for advanced natural language processing, written in the programming languages Python and Cython):

  • Step1: Install required libraries

  • Step2: Create patterns and responses file

  • Step3: Train the Model

  • Step4: Create ChatBot Application based on the trained model

So Let us start.

0
0 3503
Question ala zaalouni · Jul 10, 2024

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) also there is an error:"An error occurred: Command '['iop', '-m',

0
0 0
Article Guillaume Rongier · Jul 8, 2024 8m read

Description

This is a template for an Django application that can be deployed in IRIS as an native Web Application.

Installation

  1. Clone the repository
  2. Create a virtual environment
  3. Install the requirements
  4. Run the docker-compose file
git clone
cd iris-django-template
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
docker-compose up

Usage

The base URL is http://localhost:53795/django/.

Endpoints

0
0 0
Article Guillaume Rongier · Jul 8, 2024 3m read

Context

The Web Server Gateway Interface (WSGI) is a simple calling convention for web servers to forward requests to web applications or frameworks written in the Python programming language. WSGI is a Python standard described in detail in PEP 3333.

🤔 Ok, great definition and what the point with iris ?

IRIS 2024.2+ has a new feature that allows you to run WSGI applications directly on IRIS. This feature is a great way to integrate IRIS with other Python frameworks and libraries.

0
0 0