Python adapter via callout for InterSystems Data Platforms.
- Load ObjectScript code.
- Place callout DLL in
bin
folder. - Check that your
PYTHONHOME
environment variable points to Python 3.6. - Check that your SYSTEM
PATH
environment variable hasPYTHONHOME
variable (or directory it points to).
- Call:
do ##class(isc.py.Callout).Setup()
once per systems start (add to ZSTART!) - Call:
do ##class(isc.py.Callout).Initialize()
once per process - Call main method (can be called many times, context persists):
write ##class(isc.py.Callout).SimpleString(code, data)
- Call:
do ##class(isc.py.Callout).Finalize()
to free Python context - Call:
write ##class(isc.py.Callout).Unload()
to free callout library
do ##class(isc.py.Callout).Setup()
do ##class(isc.py.Callout).Initialize()
write ##class(isc.py.Callout).SimpleString("x='ПРИВЕТ'","x")
write ##class(isc.py.Callout).SimpleString("x=repr('ПРИВЕТ')","x")
write ##class(isc.py.Callout).SimpleString("x=123","x")
do ##class(isc.py.Callout).Finalize()
write ##class(isc.py.Callout).Unload()
Along with callout code and Interoperability adapter there's also a test Interoperability Production and test Business Process. To use them:
- In OS bash execute
python -m pip install pyodbc pandas matplotlib seaborn
. - Execute:
do ##class(isc.py.test.CannibalizationData).Import()
to populate test data. - Create ODBC connection to the namespace with data
- In test Business Process
isc.py.test.Process
edit annotation forCorrelation Matrix: Tabular
call, specifying correct ODBC DSN in line 3 - Edit annotation for
Correlation Matrix: Graph
call, specifying valid filepath forf.savefig
function. - Save and compile business process.
- Start
isc.py.test.Production
production. - Send empty
Ens.Request
mesage to theisc.py.test.Process
.
Development of ObjectScript is done via cache-tort-git in UDL mode. Development of C code is done in Eclipse.