I found out how to use it with Python(3).
The OS is Windows.
IDE used is VS Code.
Assuming all the extensions for Azure Data Lake ( and related extensions) already setup in VS Code, download the Local Run Service and Local Run Package.
Set the SCOPE_CPP_SDK env variable (with correct path) in Windows (no need to set it up as system level env, you can choose to set it as user level env variable also).
import subprocess
Local_Run_SDK_Path = 'C:\Users\batman\AppData\Roaming\LocalRunService\LocalRunHelper.exe'
Path_to_Usql_file = 'C:\\MyProj\Usqls\Create_Tables.usql'
Path_to_Dataroot = 'C:\\DataRoot'
cmd = [Local_Run_SDK_Path, 'compile', '-Script', Path_to_Usql_file, '-DataRoot',Path_to_Dataroot]
proc = subprocess.run(cmd, stdout=subprocess.PIPE)
assert proc.returncode == 0 # if successful, the usql compilation should return 0 to proc return code
That should work.