iris-embedded-python-template


Downloads9
Follow
0
Star
3
Details
Releases
Reviews
Issues
This application is not supported by InterSystems Corporation. Use it at your own risk.

What's new in this version

GitHub URL changed

iris-embedded-python-template

This is a template to work with Embedded Python in InterSystems IRIS

Prerequisites

Make sure you have git and Docker desktop installed.

Installation ZPM

USER>zpm "install iris-python-template"

Installation docker

Clone/git pull the repo into any local directory

$ git clone https://github.com/intersystems-community/iris-embedded-python-template.git

Open the terminal in this directory and run:

$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d

How to work with it

Open IRIS terminal:

$ docker-compose exec iris iris session iris
USER>

The first test demonstrates the call to a standard python library working with dates datetime

USER>d ##class(dc.python.test).Today()
2021-02-09

Another example shows the work of a custom lib sample.py which is installed with repo or ZPM. It has function hello which returns string "world":

USER>d ##class(dc.python.test).Hello()
World

Another example shows how to work with files and use pandas and numpy libs. It calculates the mean age of Titanic passengers:

USER>d ##class(dc.python.test).TitanicMeanAge()
mean age=29.69911764705882

ZPM installation
zpm "install iris-python-template"
Rating
0 (0)
Category
Technology Example
Works with
InterSystems IRIS
Tags
Info
Version
1.0.2
Last updated
2021-02-18
Repository
Open
Documentation
Open
License
Link