Execute Python code on the fly and display results in Tableau visualizations
Python Other
Switch branches/tags
Nothing to show
Clone or download
johng42 Merge pull request #123 from RaspNote/patch-1
Server fails to start in Ubuntu 18.04
Latest commit dcef5b8 Aug 6, 2018


Tableau Python Server - Beta

Community Supported

Tableau Python Server (TabPy) is part of Tableau's expanding range of extensibility options. These include R execution via the calculation editor interface, along with the web data connector SDK, the JavaScript API, the REST API, the Tableau Data Extract API, and Tableau Document API. For details, see the Tableau Developer Portal.

For all questions not related to the TabPy code (installation, deployment, connections, Python issues, etc.) and requests use Server & Online Administration Forum on Tableau Community.


TabPy is distributed as two separate packages, namely as tabpy-client and tabpy-server. Both are available from PyPy and any combination of the packages can be installed via:

pip install tabpy-server
pip install tabpy-client

Alternately, to work from the source code you should reference the Contributing Guide for instructions on how to configure your environment and install all dependencies.


TabPy framework allows Tableau to remotely execute Python code. It has two components:

  1. A server process built on Tornado, which allows for the remote execution of Python code through a set of REST APIs. Code can either be immediately executed or persisted in the server process and exposed as a REST endpoint, to be called later.
  2. A client library that enables the deployment of such endpoints, based on Python functions.

Tableau can connect to the TabPy server to execute Python code on the fly and display results in Tableau visualizations. Users can control data and parameters being sent to TabPy by interacting with their Tableau worksheets, dashboard or stories.

To run Python code in your Tableau calculated fields, enter the address and port number for a TabPy server instance in Tableau.

Screenshot of Configuration on Tableau Desktop

On Tableau Server, use the tabadmin command line utility to configure a TabPy connection.

tabadmin stop
tabadmin set vizqlserver.extsvc.host <ip address or host name of the machine hosting TabPy>
tabadmin set vizqlserver.extsvc.port <port for TabPy>
tabadmin configure
tabadmin start

It is not necessary to install TabPy on the Tableau Server or Desktop computer-all that is required is a pointer to a TabPy server instance.

Once the configuration is done, you can use Python in calculated fields in Tableau. You can learn more about authoring Python calculations in Tableau HERE.

Screenshot of a Python calculated field on Tableau Desktop

Useful Resources

Security Considerations

The following security issues should be kept in mind as you use TabPy with Tableau:

  • The data channel between Tableau and TabPy is currently not encrypted.
  • TabPy currently does not use authentication.
  • Python scripts can contain code which can harm security on the server where the TabPy is running. For example:
    • Access file system (read/write)
    • Install new Python packages which can contain binary code
    • Execute operating system commands
    • Open network connections to other servers and download files