Follow the instructions in the Tableau Desktop and Web Authoring Help to Configure an analytics extensions connection. In the Select an External Service drop-down menu, select TabPy/External API.
Note: Do not select the RServe connection type. It uses a different protocol and will not work with services written using the Analytics Extensions API.