![]() Get the REST API Version import tableauserverclient as TSC server = TSC.Server(' print(server.version) import tableauserverclient as TSC tableau_auth = TSC.TableauAuth('USERNAME', 'PASSWORD') server = TSC.Server(' _in(tableau_auth) # Do awesome things here! _out()īecause the TSC library is a client for the Tableau server REST API, you need to confirm that the version of the TSC library you use is compatible with the version of the REST API used by the server. The validity of the token is limited by the maximum length set on the Tableau server itself, by default, this is 2 hours.Īlternatively, you can sign in and out using the functions explicitly. When you sign in with block method, TSC manages the authentication, including signing out. ![]() The TSC library automatically signs you out of Tableau server when you exit the with block. You can also override the version of the API you are authorising against by adding server.version = ''. The code above provides you with a list of all the data sources that are running on the Tableau server instance. Git clone Writing a program to list all the data sources on Tableau Server import tableauserverclient as TSC tableau_auth = TSC.TableauAuth('USERNAME', 'PASSWORD', 'SITENAME') server = TSC.Server(' with _in(tableau_auth): all_datasources, pagination_item = () print("\nThere are datasources on site: ".format(pagination_item.total_available)) print() It is possible to perform an offline install.Īll the samples are included in the samples directory of the TSC repository on GIT hub. This is not a stable version on can relly on. ![]() RUN: pip install the development branch should not be used for production.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |