1. Initial Setup
Unlike Apps Script, there's not much setup needed to start using PyScripts. Just go to the Scripting Manager (XM) and write or paste your desired PyScript in the PyScripting tab.
2. Parameters & Displaying Results
As seen in the example above, parameters can be assigned by pressing the "Add Parameter" button.
Whatever words you place in the parameter text input will be replaced across your PyScript.
For simplicity, I use the same naming convention as the CrosKeys Variables (%WORD%).
The usual CrosKeys variables (%DATE%, %CLIPBOARD%, etc) work in PyScripts. Just write them into your PyScript (the Python code) and CrosKeys will take care of the rest!
Whatever you want your PyScript to pass back to you must be in the designated "result" variable. The value of result will be pushed into the Candidate Window or CroScripts as %LASTRESULT% (Just like Apps Scripts).
3. Available Packages & Constraints
Beyond vanilla Python, the PyScripts environment is setup to use 5 standard packages.
For more information on what's possible, check out the Pyodide documentation.