#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 Nikita Mullin · Jun 1, 2020 4m read

ObjectScript Kernel LogoJupyter 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:

Jupyter Kernels 101

There are several ways to create a Jupyter Kernel. I decided to make a Python wrapper kernel.

4
3 964
Announcement Olga Zavrazhnova · Jul 11, 2022

Hi Community,

We are excited to announce that InterSystems Developers Meetups are finally back in person!

The first Python-related meetup will take place on July 21 at 6:00 at Democracy Brewing, Boston, MA. There will be 2-3 short presentations related to Python, Q&A, networking sessions as well as free beer with snacks and brewery tours.

AGENDA:

0
0 443
Article Eduard Lebedyuk · Jul 4, 2022 3m read

InterSystems Native SDK for Python is a lightweight interface to InterSystems IRIS APIs that were once available only through ObjectScript.

I'm especially interested in the ability to call ObjectScript methods, class methods, to be precise. It works, and it works great, but by default, calls only support scalar arguments: strings, booleans, integers, and floats.

But if you want to:

  • Pass or return structures, such as dicts or lists
  • Pass or return streams

You'll need to write some glue code or take this project (installs with pip install edpy). edpy package gives you one simple signature:

call(iris, class_name, method_name, args)

which allows you to call any ObjectScript method and get results back.

3
3 566
Announcement Dmitry Maslennikov · Jan 13, 2022

I think it's a known fact that Populate Utility has very limited functionality. It supports only one language and one country. The list of possible values does not have so many options. 

There is a kind of tool that now can help with it, named Faker. It has implementations in different languages, including Python. Since IRIS has now had the Embedded Python feature, Python faker can be implemented in IRIS.

3
0 309
Article Lucas Enard · May 3, 2022 44m read

This formation, accessible on my GitHub, will cover, in half a hour, how to read and write in csv and txt files, insert and get inside the IRIS database and a distant database using Postgres or how to use a FLASK API, all of that using the Interoperability framework using ONLY Python following the PEP8 convention.

This formation can mostly be done using copy paste and will guide you through everystep before challenging you with a global exercise.
We are available to answer any question or doubt in the comment of that post, on teams or even by mail at lucas.enard@intersystems.com .

1
1 752
Article José Pereira · Apr 5, 2022 4m read

Motivation

This project was thought of when I was thinking of how to let Python code deal naturally with the scalable storage and efficient retrieving mechanism given by IRIS globals, through Embedded Python.

My initial idea was to create a kind of Python dictionary implementation using globals, but soon I realized that I should deal with object abstraction first.

So, I started creating some Python classes that could wrap Python objects, storing and retrieving their data in globals, i.e., serializing and deserializing Python objects in IRIS globals.

How does it work?

1
1 2298
Job sandeep sunny · May 26, 2022

Client: Northwell Health

Role: Senior Developer

Location: Remote

Duration: 6+ Months

Description:

Team Overview:

The FHIR Platform team is tasked with providing the core infrastructure in providing access to Northwell HIE patient data complying with HL7 FHIR and USCDI standards.

Position Summary:

The primary purpose of this role is to provide technical design, coding, testing and documentation for multiple components in the FHIR solution.

Responsibilities:

• Develop end-to-end solutions, participate in code reviews, unit test and deploy.

• Documentation of technical designs and functionality

0
0 408
Article Lucas Enard · May 9, 2022 2m read

This is a benchmark built in python and objectscript in InterSystems IRIS.

The objective is to compare the speed for sending back and forth a thousand request/message from a BP to a BO in python and in objectscript.

See https://github.com/LucasEnard/benchmark-python-objectscript for more information.

IMPORTANT : Here are the results of time in seconds, for sending 1000 messagesback and forth from a bp to a bo using python, graph objectscript and objectscript.

String messages are composed of ten string variables.

3
0 429
Question Kevin McGinn · Apr 15, 2022

When looking at the "Current License Usage Summary" web page, there is a line for both local and distributed "Maximum Connections". I have scrutinized every class that seems reasonable to contain this information but have found nothing that matches the values on the web page. I do not believe these are related to license specifically though I did review all of the potential attributes of the license related classes to no avail.

2
0 338
Question Kevin McGinn · Apr 14, 2022

I am writing a Python tools I want to access the %Monitor.System.License properties:

  1. AvailableDist
  2. AvailableLocal
  3. MaxUsedDist
  4. MaxUsedLocal
  5. CurrentUsedDist
  6. CurrentUsedLocal

Initially I want to develop Objectscript to verify access to the properties. But I can not figure the proper syntax.

I first attempted:

set ans = ##class(%Monitor.System.License).AvailableDist

which failed.

I tried another approach:

set ans = ##CLASS(%Monitor.System.License).%GetParameter("AvailableLocal")

2
0 283
Article Muhammad Waseem · Apr 5, 2022 7m read

Hi Community,

This post is a introduction of my openexchange iris-globals-graphDB application.
In this article I will demonstrate how to save and retrieve Graph Data into InterSystems Globals with the help of Python Flask Web Framework and PYVIS Interactive network visualizations Library

Recommendation

Step1 : Establish Connection with IRIS Globals by using python native SDK

2
1 761
Question Kevin McGinn · Mar 21, 2022

I have the object query:

s Rset=##class(%ResultSet).%New("%SYSTEM.License.UserListAll")

I can loop through that query and it generates the report information that I need.

I have a Python process where I use the intersys import to connect to the Cache instance. But I have been unable to determine the correct syntax in Python for this query. Being that 'UserListAll' is a query I attempted to user:

res = <query>.prepare("select * from %SYSTEM.License_UserListAll")

That failed stating 'UserListAll' did not exist. Though this did not seem to be correct, I also attempted:

2
0 357
Question Kevin McGinn · Mar 15, 2022

I have developed a process that pulls data elements from a cache instance using the tools provided with the "intersys.pythonbind3" import. This is a windows box. After validating the process, the next step is to install the process on a site (Windows) that does not have an installed version of cache and access the cache instance remotely. But, since intersys.pythonbind3 is part of the cache install, I am not sure what to do  to allow this process to function because of the missing import.

1
0 427
Question Kevin McGinn · Mar 10, 2022

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

Current Connections                   --> InstanceConnections

5
0 340
Question Kevin McGinn · Mar 9, 2022

I have a python script that is pulling the cache instance key expiration date ( KeyExpirationDate() ) which comes back as an integer. With the queryscript function - $ZDATE(73284) I can derive the actual expiration date. Is there a manner or method of creating an equivalent Python script that will convert the integer return by the KeyExpirationDate()  method into a date string?

1
1 284
Question Kevin McGinn · Mar 1, 2022

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

Instead I opted to attempt a query:

6
0 239
Announcement Anastasia Dyubaylo · Feb 28, 2022

Hi Community,

Let's meet together at the online meetup with the winners of the InterSystems Python contest!

You'll have an opportunity to have a discussion with InterSystems Product Managers on the new IRIS 2021.2 Embedded Python functionality, Q&A on Python, etc. Our winners' demo included!  

Date & Time: Thursday, March 3 – 10:00 EDT

1
0 300
Question Emmanuel Vanlaar · May 24, 2020

Hi,

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:

4
0 630
Article Evgeniy Potapov · Feb 27, 2022 2m read

We are happy to share interesting information with you, as well as tell you why Python is good, where it is used.

Among the most used libraries are NumPy and Pandas. NumPy (Numerical Python) is used to sort large datasets. It simplifies mathematical operations and their vectorization on arrays. Pandas offers two data structures: Series (a list of elements) and Data Frames (a table with multiple columns). This library converts data into a Data Frame, allowing you to remove and add new columns, as well as perform various operations.

1
2 682