8000 Update README.md · Lakkichand/document-api-python@8e575cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e575cf

Browse files
committed
Update README.md
1 parent be5fab4 commit 8e575cf

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,27 @@ To use this SDK, you must have Python installed. You can use either 2.7x or 3.3x
2020

2121
Download the `.zip` file that contains the SDK. Unzip the file and then run the following command:
2222

23-
pip install -e <directory containing setup.py>
23+
```python
24+
pip install -e <directory containing setup.py>
25+
```
2426

2527
We plan on putting the package in PyPi to make installation easier.
2628

2729

2830
###Basics
2931
The following example shows the basic syntax for using the Document API to update a workbook:
3032

31-
from tableaudocumentapi import Workbook
32-
33-
sourceWB = Workbook('WorkbookToUpdate.twb')
34-
35-
sourceWB.datasources[0].connection.server = "MY-NEW-SERVER"
36-
sourceWB.datasources[0].connection.dbname = "NEW-DATABASE"
37-
sourceWB.datasources[0].connection.username = "benl"
38-
39-
sourceWB.save()
33+
```python
34+
from tableaudocumentapi import Workbook
4035

36+
sourceWB = Workbook('WorkbookToUpdate.twb')
37+
38+
sourceWB.datasources[0].connection.server = "MY-NEW-SERVER"
39+
sourceWB.datasources[0].connection.dbname = "NEW-DATABASE"
40+
sourceWB.datasources[0].connection.username = "benl"
41+
42+
sourceWB.save()
43+
```
4144

4245
**Notes**
4346

0 commit comments

Comments
 (0)
0