BSchollnick's RESTful API

Posted on
Sat Jun 21, 2014 2:34 pm
howartp offline
Posts: 3219
Joined: Jan 09, 2014
Location: West Yorkshire, UK

BSchollnick's RESTful API

Just want to thank Benjamin for his Python API for sending commands to the remote Indigo server. (Not to be confused with Indigo's built in RESTful API for scripting within Indigo)

I was using Powershell fired from a custom keyboard shortcut to run one or two actions, but there was a good 5-6 second delay whilst Powershell initiated and connected.

Using Python, from the same shortcut, the execution is down to about 1 second.

BTW, I converted it to v3.4 using the 2to3 script which is included in \Tools\Scripts when you install Python 3.

The convertor missed two lines.

Change set_server to:

Code: Select all
def   set_server (in_server_address):
      Stores the server address, for use by the API/Wrapper.
         indigo_server - the full url of the server (ie
   global server_address
   server_address = in_server_address[/quote]

and within set_server_authentication() it misses adding "urrlib.request." on the build_opener

[code]self.opener = urllib.request.build_opener( self.handler)


Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest