Using the Native API for Python
Learn to use the Native API for Python in InterSystems IRIS® data platform to directly access globals, the underlying data structure, and to call ObjectScript methods and routines.
Mark me "complete" for this video.
Learn to use the Native API for Python in InterSystems IRIS® data platform to directly access globals, the underlying data structure, and to call ObjectScript methods and routines.
Mark me "complete" for this video.
Reference | Timestamp | Code |
---|---|---|
Install Python Native API wheel file | 1:40 | pip install irisnative-1.0.0-cp36-cp36m-win_amd64.whl |
Import InterSystems IRIS Native API into a Python script | 2:03 | import irisnative |
Create a connection to your instance | 2:15 |
|
Set and get the value of a global node using the Native API for Python | 2:44 |
|
Set and get the value of a global node using ObjectScript | 2:59 |
|
Use the Native API to iterate over a global | 3:05 | subscript_iter = iris_native.iterator("^product") for subscript, value in subscript_iter: print("subscript = {}, value = {}".format(subscript, value)) |
Use ObjectScript to iterate over a global | 3:17 | set subscript = "" for { set sub = $ORDER(^product(sub), 1, val) quit: (sub = "") write !, "The current price of ", sub, " is $", val } |
Use the Native API to call InterSystems IRIS class methods and routines | 3:20 | current_date = iris_native.classMethodValue("%Library.Utility", "Date", 5) |
Having an issue with the learning site? Want to provide feedback on a course? Contact us by emailing online.training@intersystems.com.
Please include all relevant information, including the page or course you are having trouble with, and any necessary screenshots.