iris-embedded-python-template
0
3
GitHub URL changed
This is a template to work with Embedded Python in InterSystems IRIS
Make sure you have git and Docker desktop installed.
USER>zpm "install iris-python-template"
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
$ docker-compose up -d
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