8000 Merge branch 'master' into development · miturchi/server-client-python@39f4b22 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39f4b22

Browse files
author
Russell Hay
committed
Merge branch 'master' into development
2 parents 78b9684 + c4ed22e commit 39f4b22

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

README.md

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,4 @@ This repository contains Python source code and sample files.
1010

1111
For more information on installing and using TSC, see the documentation:
1212

13-
#### Installing From Source
14-
15-
Download the `.zip` file. Unzip the file and then run the following command:
16-
17-
```text
18-
pip install -e <directory containing setup.py>
19-
```
20-
21-
#### Installing the Development Version from Git
22-
23-
*Only do this if you know you want the development version, no guarantee that we won't break APIs during development*
24-
25-
```text
26-
pip install git+https://github.com/tableau/server-client-python.git@development
27-
```
28-
29-
If you go this route, but want to switch back to the non-development version, you need to run the following command before installing the stable version:
30-
31-
```text
32-
pip uninstall tableauserverclient
33-
```
34-
35-
###Basics
36-
The following example shows the basic syntax for using the Server Client to query a list of all workbooks and the associated pagination information on the default site:
37-
38-
```python
39-
import tableauserverclient
40-
41-
tableau_auth = tableauserverclient.TableauAuth('USERNAME', 'PASSWORD')
42-
server = tableauserverclient.Server('SERVER')
43-
44-
with server.auth.sign_in(tableau_auth):
45-
all_workbooks, pagination_item = server.workbooks.get()
46-
```
47-
48-
###Server Client Samples
49-
* Can be run using the command prompt or terminal
50-
51-
Demo | Source Code | Description
52-
-------- | -------- | --------
53-
Publish Workbook | [publish_workbook.py](./samples/publish_workbook.py) | Shows how to upload a Tableau workbook.
54-
Move Workbook | [move_workbook_projects.py](./samples/move_workbook_projects.py)<br />[move_workbook_sites.py](./samples/move_workbook_sites.py) | Shows how to move a workbook from one project/site to another. Moving across different sites require downloading the workbook. 2 methods of downloading are demonstrated in the sites sample.<br /><br />Moving to another project uses an API call to update workbook.<br />Moving to another site uses in-memory download method.
55-
Set HTTP Options | [set_http_options.py](./samples/set_http_options.py) | Sets HTTP options on server and downloads workbooks.
56-
Explore Datasource | [explore_datasource.py](./samples/explore_datasource.py) | Demonstrates working with Tableau Datasource. Queries all datasources, picks one and populates its connections, then updates the datasource. Has additional flags for publish and download.
57-
Explore Workbook | [explore_workbook.py](./samples/explore_workbook.py) | Demonstrates working with Tableau Workbook. Queries all workbooks, picks one and populates its connections/views, then updates the workbook. Has additional flags for publish, download, and getting the preview image. Note: if you don't have permissions on the workbook the script retrieves from the server, the script will result in a 403033 error. This is expected.
58-
Initialize Server | [initialize_server.py](./samples/initialize_server.py) | Shows how to intialize a Tableau Server with datasources and workbooks from the local file system.
59-
60-
61-
62-
###Adding New Features
63-
64-
1. Create an endpoint class for the new feature, following the structure of the other endpoints. Each endpoint usually has get, post, update, and delete operations that require making the url, creating the xml request if necesssary, sending the request and creating the target item object based on the server response.
65-
2. Create an item class for the new feature, following the structure of the other item classes. Each item has properties that correspond to what attributes are sent to/received from the server (refer to docs amd Postman for attributes). Some items also require constants for user input that are limited to specific strings. After making all the properties, make the parsing method that takes the server response and creates an instances of the target item. If the corresponding endpoint class has an update function, then parsing is broken into multiple parts (refer to another item like workbook or datasource for example).
66-
3. Add testing by getting real xml responses from the server, and asserting that all properties are parsed and set correctly.
67-
4. Add samples to show users how to use the new feature.
13+
<https://tableau.github.io/server-client-python/docs/>

0 commit comments

Comments
 (0)
0