-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial documentation for TSC #98
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
91692e7
First cut at API docs
jdomingu 4d15bda
Update jquery version for bootstrap compatibility
jdomingu b0d1eaf
Incorporate review feedback
jdomingu 848cf57
Add pagination docs
jdomingu cb0366e
Add dev guide
jdomingu 8ed38d1
Add docs for populating views and connections
jdomingu 337eb16
Continue adding to api ref
jdomingu fad80a5
Edits for existing content
jdomingu 1fa9339
Update readme to point to docs
jdomingu 2875806
Incorporate edits from PR
jdomingu File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,4 +138,8 @@ $RECYCLE.BIN/ | |
*.msp | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
*.lnk | ||
|
||
# Documentation | ||
docs/_site/ | ||
docs/.jekyll-metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,13 @@ | ||
# server-client-python | ||
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. | ||
# Tableau Server Client (Python) | ||
|
||
This repository contains Python source and sample files. | ||
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: | ||
|
||
###Getting Started | ||
You must have Python installed. You can use either 2.7.X or 3.3 and later. | ||
* Publish workbooks and data sources. | ||
* Create users and groups. | ||
* Query projects, sites, and more. | ||
|
||
#### Installing the latest stable version (preferred) | ||
This repository contains Python source code and sample files. | ||
|
||
```text | ||
pip install tableauserverclient | ||
``` | ||
For more information on installing and using TSC, see the documentation: | ||
|
||
#### Installing From Source | ||
|
||
Download the `.zip` file. Unzip the file and then run the following command: | ||
|
||
```text | ||
pip install -e <directory containing setup.py> | ||
``` | ||
|
||
#### Installing the Development Version from Git | ||
|
||
*Only do this if you know you want the development version, no guarantee that we won't break APIs during development* | ||
|
||
```text | ||
pip install git+https://github.com/tableau/server-client-python.git@development | ||
``` | ||
|
||
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: | ||
|
||
```text | ||
pip uninstall tableauserverclient | ||
``` | ||
|
||
###Basics | ||
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: | ||
|
||
```python | ||
import tableauserverclient | ||
|
||
tableau_auth = tableauserverclient.TableauAuth('USERNAME', 'PASSWORD') | ||
server = tableauserverclient.Server('SERVER') | ||
|
||
with server.auth.sign_in(tableau_auth): | ||
all_workbooks, pagination_item = server.workbooks.get() | ||
``` | ||
|
||
###Server Client Samples | ||
* Can be run using the command prompt or terminal | ||
|
||
Demo | Source Code | Description | ||
-------- | -------- | -------- | ||
Publish Workbook | [publish_workbook.py](./samples/publish_workbook.py) | Shows how to upload a Tableau workbook. | ||
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. | ||
Set HTTP Options | [set_http_options.py](./samples/set_http_options.py) | Sets HTTP options on server and downloads workbooks. | ||
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. | ||
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. | ||
<https://tableau.github.io/server-client-python/docs/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source 'https://rubygems.org' | ||
gem 'github-pages', group: :jekyll_plugins | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
activesupport (4.2.6) | ||
i18n (~> 0.7) | ||
json (~> 1.7, >= 1.7.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
addressable (2.4.0) | ||
coffee-script (2.4.1) | ||
coffee-script-source | ||
execjs | ||
coffee-script-source (1.10.0) | ||
colorator (0.1) | ||
ethon (0.9.0) | ||
ffi (>= 1.3.0) | ||
execjs (2.7.0) | ||
faraday (0.9.2) | ||
multipart-post (>= 1.2, < 3) | ||
ffi (1.9.10) | ||
ffi (1.9.10-x86-mingw32) | ||
gemoji (2.1.0) | ||
github-pages (80) | ||
github-pages-health-check (= 1.1.0) | ||
jekyll (= 3.1.6) | ||
jekyll-coffeescript (= 1.0.1) | ||
jekyll-feed (= 0.5.1) | ||
jekyll-gist (= 1.4.0) | ||
jekyll-github-metadata (= 1.11.1) | ||
jekyll-mentions (= 1.1.2) | ||
jekyll-paginate (= 1.1.0) | ||
jekyll-redirect-from (= 0.10.0) | ||
jekyll-sass-converter (= 1.3.0) | ||
jekyll-seo-tag (= 1.4.0) | ||
jekyll-sitemap (= 0.10.0) | ||
jemoji (= 0.6.2) | ||
kramdown (= 1.10.0) | ||
liquid (= 3.0.6) | ||
listen (= 3.0.6) | ||
mercenary (~> 0.3) | ||
rouge (= 1.10.1) | ||
terminal-table (~> 1.4) | ||
github-pages-health-check (1.1.0) | ||
addressable (~> 2.3) | ||
net-dns (~> 0.8) | ||
octokit (~> 4.0) | ||
public_suffix (~> 1.4) | ||
typhoeus (~> 0.7) | ||
html-pipeline (2.4.1) | ||
activesupport (>= 2, < 5) | ||
nokogiri (>= 1.4) | ||
i18n (0.7.0) | ||
jekyll (3.1.6) | ||
colorator (~> 0.1) | ||
jekyll-sass-converter (~> 1.0) | ||
jekyll-watch (~> 1.1) | ||
kramdown (~> 1.3) | ||
liquid (~> 3.0) | ||
mercenary (~> 0.3.3) | ||
rouge (~> 1.7) | ||
safe_yaml (~> 1.0) | ||
jekyll-coffeescript (1.0.1) | ||
coffee-script (~> 2.2) | ||
jekyll-feed (0.5.1) | ||
jekyll-gist (1.4.0) | ||
octokit (~> 4.2) | ||
jekyll-github-metadata (1.11.1) | ||
octokit (~> 4.0) | ||
jekyll-mentions (1.1.2) | ||
html-pipeline (~> 2.3) | ||
jekyll (~> 3.0) | ||
jekyll-paginate (1.1.0) | ||
jekyll-redirect-from (0.10.0) | ||
jekyll (>= 2.0) | ||
jekyll-sass-converter (1.3.0) | ||
sass (~> 3.2) | ||
jekyll-seo-tag (1.4.0) | ||
jekyll (~> 3.0) | ||
jekyll-sitemap (0.10.0) | ||
jekyll-watch (1.4.0) | ||
listen (~> 3.0, < 3.1) | ||
jemoji (0.6.2) | ||
gemoji (~> 2.0) | ||
html-pipeline (~> 2.2) | ||
jekyll (>= 3.0) | ||
json (1.8.3) | ||
kramdown (1.10.0) | ||
liquid (3.0.6) | ||
listen (3.0.6) | ||
rb-fsevent (>= 0.9.3) | ||
rb-inotify (>= 0.9.7) | ||
mercenary (0.3.6) | ||
mini_portile2 (2.0.0) | ||
minitest (5.9.0) | ||
multipart-post (2.0.0) | ||
net-dns (0.8.0) | ||
nokogiri (1.6.7.2) | ||
mini_portile2 (~> 2.0.0.rc2) | ||
nokogiri (1.6.7.2-x86-mingw32) | ||
mini_portile2 (~> 2.0.0.rc2) | ||
octokit (4.3.0) | ||
sawyer (~> 0.7.0, >= 0.5.3) | ||
public_suffix (1.5.3) | ||
rb-fsevent (0.9.7) | ||
rb-inotify (0.9.7) | ||
ffi (>= 0.5.0) | ||
rouge (1.10.1) | ||
safe_yaml (1.0.4) | ||
sass (3.4.22) | ||
sawyer (0.7.0) | ||
addressable (>= 2.3.5, < 2.5) | ||
faraday (~> 0.8, < 0.10) | ||
terminal-table (1.5.2) | ||
thread_safe (0.3.5) | ||
typhoeus (0.8.0) | ||
ethon (>= 0.8.0) | ||
tzinfo (1.2.2) | ||
thread_safe (~> 0.1) | ||
|
||
PLATFORMS | ||
ruby | ||
x86-mingw32 | ||
|
||
DEPENDENCIES | ||
github-pages | ||
|
||
BUNDLED WITH | ||
1.12.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Site settings | ||
title: Tableau Server Client Library (Python) | ||
email: github@tableau.com | ||
description: Simplify interactions with the Tableau Server REST API. | ||
baseurl: "/server-client-python" | ||
permalinks: pretty | ||
defaults: | ||
- | ||
scope: | ||
path: "" # Apply to all files | ||
values: | ||
layout: "default" | ||
|
||
# Build settings | ||
markdown: kramdown | ||
highlighter: rouge | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="well docs-menu col-xs-12 col-sm-4 col-md-3"> | ||
<ul class="nav nav-list"> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs">Get Started</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/sign-in-out">Sign In and Out</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/versions">Versions</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/page-through-results">Page through Results</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/populate-connections-views">Populate Connections and Views</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/filter-sort">Filter and Sort</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/samples">Samples</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/api-ref">API Reference</a> | ||
</li> | ||
<li> | ||
<a href="{{ site.baseurl }}/docs/dev-guide">Developer Guide</a> | ||
</li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- Footer --> | ||
<footer> | ||
<div class="row"> | ||
<hr class="footer-hr"> | ||
<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> | ||
<p>© 2016 Tableau.</p> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title> | ||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}"> | ||
|
||
<link rel="shortcut icon" type="image/png" href="{{ site.baseurl }}/assets/logo.png"> | ||
|
||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css"> | ||
<link rel="stylesheet" href="{{ site.baseurl }}/css/github-highlight.css"> | ||
|
||
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<header class="site-header"> | ||
<div class="wrapper"> | ||
<nav class="navbar navbar-default navbar-fixed-top"> | ||
<div class="container"> | ||
<div class="navbar-header"> | ||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
<a class="navbar-brand navbar-brand-logo" href="{{ site.baseurl }}/#">Tableau Server Client (Python)</a> | ||
</div> | ||
<div id="navbar" class="navbar-collapse collapse"> | ||
<ul class="nav navbar-nav"> | ||
<li><a href="{{ site.baseurl }}/docs/">Docs</a></li> | ||
<li><a href="{{ site.baseurl }}/docs/api-ref">API Reference</a></li> | ||
<li><a target="_blank" href="https://community.tableau.com/community/developers/content">Forum</a></li> | ||
<!-- <li><a href="{{ site.baseurl }}/news/">What's New?</a></li> --> | ||
</ul> | ||
<ul class="nav navbar-nav navbar-right"> | ||
<li class="tableauIcon"><a target="_blank" href="http://tableau.com"><img src="{{ site.baseurl }}/assets/logo.png" alt="Tableau Developers" class="logo" /></a></li> | ||
<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> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
</div> | ||
</header> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
{% include head.html %} | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
{% include header.html %} | ||
<ul class="blogul"> | ||
{% for post in site.posts %} | ||
<div class="row"> | ||
<h1>{{ post.title }}</h1> | ||
<hr> | ||
<p><span class="glyphicon glyphicon-time"></span> Posted on {{ post.date | date: "%-d %B %Y" }}</p> | ||
<hr> | ||
<p class="lead"> | ||
{{ post.abstract }} | ||
</p> | ||
{% if post.photoname %} | ||
<img class="img-responsive" src="{{ site.baseurl }}/assets/{{ post.photoname}}" alt=""> {% endif %} | ||
<hr> | ||
<div class="blog-content"> | ||
{{ post.content }} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</ul> | ||
{% include footer.html %} | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
layout: docs | ||
--- | ||
|
||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
{% include head.html %} | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
{% include header.html %} | ||
{% include docs_menu.html %} | ||
|
||
<div class="content .col-xs-12 .col-sm-8 .col-md-9"> | ||
<h1>{{ page.title }}</h1> | ||
<div class="edit-container"> | ||
<a href="https://github.com/tableau/server-client-python/edit/master/docs/docs/{{ page.path }}" class="edit-links"><span class="glyphicon glyphicon-pencil"></span> Edit this page</a> | ||
| ||
<a href="https://github.com/tableau/server-client-python/issues" class="edit-links"><span class="glyphicon glyphicon-flag"></span> Submit an issue</a> | ||
</div> | ||
<br /> | ||
{{ content }} | ||
{% include footer.html %} | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it docs/docs/ {{path}} I think in document-api it's just docs/{{path}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Copypasta problem :) Should be fixed.