Movatterモバイル変換


[0]ホーム

URL:


Get Started

Edit this page   Submit an issue

Use the Tableau Server Client (TSC) library to increase your productivity as you interact with the Tableau Server REST API. Withthe TSC library you can do almost everything that you can do with the REST API, including:

If you need help or to report issues, refer to theGetting Help page.

This page describes how to:

Confirm prerequisites

Before you install TSC, confirm that you have the following dependencies installed:

Install TSC

You can install TSC with pip or from the source code.

Install with pip (recommended)

Run the following command to install the latest stable version of TSC:

pipinstall--upgrade pippipinstalltableauserverclient

Install from the development branch

You can install from the development branch for a preview of upcoming features. Run the following commandto install from the development branch:

pipinstallgit+https://github.com/tableau/server-client-python.git@development

Note that the version from the development branch should not be used for production code. The methods and endpoints in thedevelopment version are subject to change at any time before the next stable release.

Install on an offline machine

To install TSC onto a machine without an internet connection, use the following steps:

1) Ensure that Python is installed.

2) Download and manually install therequests Python library (and its dependencies).

3) Download thesetup package.

4) Runpip install ./tableauserverclient-x.y.tar.gz

Get the samples

The TSC samples are included in thesamples directory of the TSC repository on Github. You can run the following command to clone therepository:

git clone git@github.com:tableau/server-client-python.git

For more information on the samples and how to run the samples, seeSamples.

Write your first program

Run the following code to get a list of all the data sources on your installation of Tableau Server:

importtableauserverclientasTSCtableau_auth=TSC.TableauAuth('USERNAME','PASSWORD','SITENAME')server=TSC.Server('http://SERVER_URL')withserver.auth.sign_in(tableau_auth):all_datasources,pagination_item=server.datasources.get()print("\nThere are {} datasources on site: ".format(pagination_item.total_available))print([datasource.namefordatasourceinall_datasources])

SERVER_URL is the URL of your Tableau server without subpaths. For local Tableau servers, an example would be:https://www.MY_SERVER.com. For Tableau Cloud, an example would be:https://10ax.online.tableau.com/.

SITENAME is the subpath of your full site URL (also calledcontentURL in the REST API).MYSITE would be the site name ofhttps://10ax.online.tableau.com/MYSITE. This parameter can be omitted when signing in to the Default site of a on premise Tableau server.

SeeSign In and Out for more details about the sign in & out options.


[8]ページ先頭

©2009-2025 Movatter.jp