Recent versions of IRIS come with Lite Terminal available from VSCode. It's a websocket server, with JSON messaging. Here's how to connect to it from Python:
import websocket
import argparse
import requests
import json
def terminal(host, port, namespace, username, password, command, secure):
session = requests.Session()
r = session.get(f"http{"s" if secure else ""}://{host}:{port}/api/atelier/", auth=(username, password))
cookies = session.cookies.get_dict()
ws = websocket.WebSocket()
ws.