You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
## iris-embedded-python-template
2
2
This is a template to work with Embedded Python in InterSystems IRIS
3
+
It demonstrates how to call python libs from ObjectScript in dc.python.test class.
4
+
And it demonstrates how to deal with IRIS from python scripts - python/irisapp.py
3
5
4
6
## Prerequisites
5
7
Make sure you have [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and [Docker desktop](https://www.docker.com/products/docker-desktop) installed.
Open VSCode in Devcontainer - this is the bell(notifications) button in the left bottom corner, where you will see the suggestion to open VSCOde in DevContainer mode.
68
+
Follow it - it will let to execute Embedded Python scripts vs IRIS and develop it at the same time.
69
+
70
+
Once devcontainer is opened go to /python/irisapp.py and run it, either with Run button in the top right corner, or in terminal via:
71
+
```
72
+
irispython /python/irisapp.py
73
+
```
74
+
The script contains different samples of working with IRIS from python and goes through it.
75
+
76
+
Feel free to use the template for your own development just by adding new py files.
do $SYSTEM.OBJ.ImportDir("/opt/irisbuild/src",, "ck")
79
+
```
80
+
81
+
82
+
### run tests described in the module
83
+
84
+
IRISAPP>zpm
85
+
IRISAPP:zpm>load /irisrun/repo
86
+
IRISAPP:zpm>test package-name
87
+
88
+
### install ZPM with one line
89
+
// Install ZPM
90
+
set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name) set url="https://pm.community.intersystems.com/packages/zpm/latest/installer" Do ##class(%Net.URLParser).Parse(url,.comp) set ht = ##class(%Net.HttpRequest).%New(), ht.Server = comp("host"), ht.Port = 443, ht.Https=1, ht.SSLConfiguration=name, st=ht.Get(comp("path")) quit:'st $System.Status.GetErrorText(st) set xml=##class(%File).TempFilename("xml"), tFile = ##class(%Stream.FileBinary).%New(), tFile.Filename = xml do tFile.CopyFromAndSave(ht.HttpResponse.Data) do ht.%Close(), $system.OBJ.Load(xml,"ck") do ##class(%File).Delete(xml)
0 commit comments