Skip to content

Commit 78b9684

Browse files
jdominguRussell Hay
authored andcommitted
Initial documentation for TSC (tableau#98)
* First cut at API docs * Update jquery version for bootstrap compatibility * Incorporate review feedback * Add pagination docs * Add dev guide * Add docs for populating views and connections * Continue adding to api ref * Edits for existing content * Update readme to point to docs * Incorporate edits from PR
1 parent 818645b commit 78b9684

28 files changed

Lines changed: 2341 additions & 11 deletions

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,8 @@ $RECYCLE.BIN/
141141
*.msp
142142

143143
# Windows shortcuts
144-
*.lnk
144+
*.lnk
145+
146+
# Documentation
147+
docs/_site/
148+
docs/.jekyll-metadata

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
# server-client-python
2-
Tableau Server Client is a client library for the Tableau REST API. The Server Client is delightful to use and easy to love because it requires writing much less code than working directly with the REST API.
1+
# Tableau Server Client (Python)
32

4-
This repository contains Python source and sample files.
3+
Use the Tableau Server Client (TSC) library to increase your productivity as you interact with the Tableau Server REST API. With the TSC library you can do almost everything that you can do with the REST API, including:
54

6-
###Getting Started
7-
You must have Python installed. You can use either 2.7.X or 3.3 and later.
5+
* Publish workbooks and data sources.
6+
* Create users and groups.
7+
* Query projects, sites, and more.
88

9-
#### Installing the latest stable version (preferred)
9+
This repository contains Python source code and sample files.
1010

11-
```text
12-
pip install tableauserverclient
13-
```
11+
For more information on installing and using TSC, see the documentation:
1412

1513
#### Installing From Source
1614

@@ -66,4 +64,4 @@ Initialize Server | [initialize_server.py](./samples/initialize_server.py) | Sho
6664
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.
6765
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).
6866
3. Add testing by getting real xml responses from the server, and asserting that all properties are parsed and set correctly.
69-
4. Add samples to show users how to use the new feature.
67+
4. Add samples to show users how to use the new feature.

docs/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages', group: :jekyll_plugins
3+

docs/Gemfile.lock

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
activesupport (4.2.6)
5+
i18n (~> 0.7)
6+
json (~> 1.7, >= 1.7.7)
7+
minitest (~> 5.1)
8+
thread_safe (~> 0.3, >= 0.3.4)
9+
tzinfo (~> 1.1)
10+
addressable (2.4.0)
11+
coffee-script (2.4.1)
12+
coffee-script-source
13+
execjs
14+
coffee-script-source (1.10.0)
15+
colorator (0.1)
16+
ethon (0.9.0)
17+
ffi (>= 1.3.0)
18+
execjs (2.7.0)
19+
faraday (0.9.2)
20+
multipart-post (>= 1.2, < 3)
21+
ffi (1.9.10)
22+
ffi (1.9.10-x86-mingw32)
23+
gemoji (2.1.0)
24+
github-pages (80)
25+
github-pages-health-check (= 1.1.0)
26+
jekyll (= 3.1.6)
27+
jekyll-coffeescript (= 1.0.1)
28+
jekyll-feed (= 0.5.1)
29+
jekyll-gist (= 1.4.0)
30+
jekyll-github-metadata (= 1.11.1)
31+
jekyll-mentions (= 1.1.2)
32+
jekyll-paginate (= 1.1.0)
33+
jekyll-redirect-from (= 0.10.0)
34+
jekyll-sass-converter (= 1.3.0)
35+
jekyll-seo-tag (= 1.4.0)
36+
jekyll-sitemap (= 0.10.0)
37+
jemoji (= 0.6.2)
38+
kramdown (= 1.10.0)
39+
liquid (= 3.0.6)
40+
listen (= 3.0.6)
41+
mercenary (~> 0.3)
42+
rouge (= 1.10.1)
43+
terminal-table (~> 1.4)
44+
github-pages-health-check (1.1.0)
45+
addressable (~> 2.3)
46+
net-dns (~> 0.8)
47+
octokit (~> 4.0)
48+
public_suffix (~> 1.4)
49+
typhoeus (~> 0.7)
50+
html-pipeline (2.4.1)
51+
activesupport (>= 2, < 5)
52+
nokogiri (>= 1.4)
53+
i18n (0.7.0)
54+
jekyll (3.1.6)
55+
colorator (~> 0.1)
56+
jekyll-sass-converter (~> 1.0)
57+
jekyll-watch (~> 1.1)
58+
kramdown (~> 1.3)
59+
liquid (~> 3.0)
60+
mercenary (~> 0.3.3)
61+
rouge (~> 1.7)
62+
safe_yaml (~> 1.0)
63+
jekyll-coffeescript (1.0.1)
64+
coffee-script (~> 2.2)
65+
jekyll-feed (0.5.1)
66+
jekyll-gist (1.4.0)
67+
octokit (~> 4.2)
68+
jekyll-github-metadata (1.11.1)
69+
octokit (~> 4.0)
70+
jekyll-mentions (1.1.2)
71+
html-pipeline (~> 2.3)
72+
jekyll (~> 3.0)
73+
jekyll-paginate (1.1.0)
74+
jekyll-redirect-from (0.10.0)
75+
jekyll (>= 2.0)
76+
jekyll-sass-converter (1.3.0)
77+
sass (~> 3.2)
78+
jekyll-seo-tag (1.4.0)
79+
jekyll (~> 3.0)
80+
jekyll-sitemap (0.10.0)
81+
jekyll-watch (1.4.0)
82+
listen (~> 3.0, < 3.1)
83+
jemoji (0.6.2)
84+
gemoji (~> 2.0)
85+
html-pipeline (~> 2.2)
86+
jekyll (>= 3.0)
87+
json (1.8.3)
88+
kramdown (1.10.0)
89+
liquid (3.0.6)
90+
listen (3.0.6)
91+
rb-fsevent (>= 0.9.3)
92+
rb-inotify (>= 0.9.7)
93+
mercenary (0.3.6)
94+
mini_portile2 (2.0.0)
95+
minitest (5.9.0)
96+
multipart-post (2.0.0)
97+
net-dns (0.8.0)
98+
nokogiri (1.6.7.2)
99+
mini_portile2 (~> 2.0.0.rc2)
100+
nokogiri (1.6.7.2-x86-mingw32)
101+
mini_portile2 (~> 2.0.0.rc2)
102+
octokit (4.3.0)
103+
sawyer (~> 0.7.0, >= 0.5.3)
104+
public_suffix (1.5.3)
105+
rb-fsevent (0.9.7)
106+
rb-inotify (0.9.7)
107+
ffi (>= 0.5.0)
108+
rouge (1.10.1)
109+
safe_yaml (1.0.4)
110+
sass (3.4.22)
111+
sawyer (0.7.0)
112+
addressable (>= 2.3.5, < 2.5)
113+
faraday (~> 0.8, < 0.10)
114+
terminal-table (1.5.2)
115+
thread_safe (0.3.5)
116+
typhoeus (0.8.0)
117+
ethon (>= 0.8.0)
118+
tzinfo (1.2.2)
119+
thread_safe (~> 0.1)
120+
121+
PLATFORMS
122+
ruby
123+
x86-mingw32
124+
125+
DEPENDENCIES
126+
github-pages
127+
128+
BUNDLED WITH
129+
1.12.5

docs/_config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Site settings
2+
title: Tableau Server Client Library (Python)
3+
email: github@tableau.com
4+
description: Simplify interactions with the Tableau Server REST API.
5+
baseurl: "/server-client-python"
6+
permalinks: pretty
7+
defaults:
8+
-
9+
scope:
10+
path: "" # Apply to all files
11+
values:
12+
layout: "default"
13+
14+
# Build settings
15+
markdown: kramdown
16+
highlighter: rouge
17+

docs/_includes/docs_menu.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<div class="well docs-menu col-xs-12 col-sm-4 col-md-3">
2+
<ul class="nav nav-list">
3+
<li>
4+
<a href="{{ site.baseurl }}/docs">Get Started</a>
5+
</li>
6+
<li>
7+
<a href="{{ site.baseurl }}/docs/sign-in-out">Sign In and Out</a>
8+
</li>
9+
<li>
10+
<a href="{{ site.baseurl }}/docs/versions">Versions</a>
11+
</li>
12+
<li>
13+
<a href="{{ site.baseurl }}/docs/page-through-results">Page through Results</a>
14+
</li>
15+
<li>
16+
<a href="{{ site.baseurl }}/docs/populate-connections-views">Populate Connections and Views</a>
17+
</li>
18+
<li>
19+
<a href="{{ site.baseurl }}/docs/filter-sort">Filter and Sort</a>
20+
</li>
21+
<li>
22+
<a href="{{ site.baseurl }}/docs/samples">Samples</a>
23+
</li>
24+
<li>
25+
<a href="{{ site.baseurl }}/docs/api-ref">API Reference</a>
26+
</li>
27+
<li>
28+
<a href="{{ site.baseurl }}/docs/dev-guide">Developer Guide</a>
29+
</li>
30+
</ul>
31+
</div>

docs/_includes/footer.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- Footer -->
2+
<footer>
3+
<div class="row">
4+
<hr class="footer-hr">
5+
<p>This site is open source. Suggestions and pull requests are welcome on our <a href="https://github.com/tableau/server-client-python">GitHub page</a>.</p>
6+
<p>&copy; 2016 Tableau.</p>
7+
</div>
8+
</footer>

docs/_includes/head.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<meta charset="utf-8">
2+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
3+
<meta name="viewport" content="width=device-width, initial-scale=1">
4+
5+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
6+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
7+
8+
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/logo.png">
9+
10+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
11+
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
12+
<link rel="stylesheet" href="{{ site.baseurl }}/css/github-highlight.css">
13+
14+
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
15+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

docs/_includes/header.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<header class="site-header">
2+
<div class="wrapper">
3+
<nav class="navbar navbar-default navbar-fixed-top">
4+
<div class="container">
5+
<div class="navbar-header">
6+
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
7+
<span class="sr-only">Toggle navigation</span>
8+
<span class="icon-bar"></span>
9+
<span class="icon-bar"></span>
10+
<span class="icon-bar"></span>
11+
</button>
12+
<a class="navbar-brand navbar-brand-logo" href="{{ site.baseurl }}/#">Tableau Server Client (Python)</a>
13+
</div>
14+
<div id="navbar" class="navbar-collapse collapse">
15+
<ul class="nav navbar-nav">
16+
<li><a href="{{ site.baseurl }}/docs/">Docs</a></li>
17+
<li><a href="{{ site.baseurl }}/docs/api-ref">API Reference</a></li>
18+
<li><a target="_blank" href="https://community.tableau.com/community/developers/content">Forum</a></li>
19+
<!-- <li><a href="{{ site.baseurl }}/news/">What's New?</a></li> -->
20+
</ul>
21+
<ul class="nav navbar-nav navbar-right">
22+
<li class="tableauIcon"><a target="_blank" href="http://tableau.com"><img src="{{ site.baseurl }}/assets/logo.png" alt="Tableau Developers" class="logo" /></a></li>
23+
<li><a target="_blank" href="https://github.com/tableau/server-client-python"><span class="icon icon--github" title="Tableau Server Client on GitHub" alt="Tableau Server Client on GitHub">{% include icon-github.svg %}</span></a></li>
24+
</ul>
25+
</div>
26+
</div>
27+
</nav>
28+
</div>
29+
</header>

docs/_includes/icon-github.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)