Article
· Jul 25, 2022 8m read
Introduction to Django part 2

In the first part, I've shown how to start a new project on Django, as well as define new models and add already existing models.

This time, I'll introduce an admin panel, available out of the box and how it can be useful.

Important note: do not expect that if you try to repeat actions from this post it will work for you, it does not. During the article, I had to do some fixes in the django-iris project, and even in DB-API driver made by InterSystems to fix some issues there as well, and I think this driver is still in development, and we will get more stable driver in future. Let's decide that this article only explains how it could be if we would have all done.

11 2
0 364

Python has become the most used programming language in the world (source: https://www.tiobe.com/tiobe-index/) and SQL continues to lead the way as a database language. Wouldn't it be great for Python and SQL to work together to deliver new functionality that SQL alone cannot? After all, Python has more than 380,000 published libraries (source: https://pypi.org/) with very interesting capabilities to extend your SQL queries within Python.

17 3
0 971

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.

7 3
3 468



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.

12 1
1 603
Article
· Apr 5, 2022 4m read
Serializing Python objects in globals

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.

6 1
1 2.2K
Article
· Feb 27, 2022 2m read
Dash-Python-IRIS

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.

4 1
2 509

Hi Community,

This post is a introduction of my openexchange iris-python-apps application. Build by using Embedded Python and Python Flask Web Framework.
Application also demonstrates some of the Python functionalities like Data Science, Data Plotting, Data Visualization and QR Code generation.

image

Features

  • Responsive bootstrap IRIS Dashboard

  • View dashboard details along with interoperability events log and messages.

  • Use of Python plotting from IRIS

  • Use of Jupyter Notebook

  • Introduction to Data Science, Data Plotting and Data Visualization.

  • QR Code generator from python.

4 1
0 4.2K
Article
· Feb 8, 2022 1m read
GlobalToJSON-embeddedPython-pure

I have created a package to export a Global into JSON object file and to re-create it by reloading from this file
embeddedPython refers to the new available technologies. It should be understood as a learning exercise of
how to handle the language interfaces. Only Global nodes containing data are presented in the generated JSON file.
Differently from the previous example, this one is using embedded Python only, no ObjectScript. Therefore PURE

8 2
0 471

I have just created a new Global Master Topic, "IRIS Cheatsheets". IRIS has introduced a lot of new functionality, especially in scripting languages, FHIR R4 support, enhanced Interoperability Tools, and IRIS Analytics. Having spent 35 years working on Windows-based PC's and Laptops, I have surprisingly little knowledge of Linux, Docker and Git. Furthermore, I have written almost every application and Interface in ObjectScript with splatterings of SQL, .Net, and Java Gateways and the most basic knowledge of WinSCP, Putty, SSH. All that changed when I received my first Raspberry Pi.

8 3
1 456

Continuing the description of work on the use of the openhl python module in productive mode.

Since the version of iris with Embedded Python, does not yet have a final release, it is already necessary to use it in production now. We decided to back up the service for exporting requests to a xlsx file on a separate server, and save the query result in a global in a separate database.

8 0
1 292