Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
fb36a3a
Fix #117 by only attempting files with the right extension inside the…
t8y8 Dec 12, 2016
fe16c0c
Commenting and Docstring cleanup. A few very small code cleanups (#120)
t8y8 Dec 14, 2016
cdccd2f
Small cleanups for various editors. Play nice with built in test-runn…
t8y8 Dec 15, 2016
3ab99f4
Add Py36, update travis to use pycodestyle (#124)
t8y8 Jan 6, 2017
cc97fc4
Add `initial sql` and `query band` support (#123)
r-richmond Jan 9, 2017
3d8021d
Prep for release of 0.6 (#125)
Jan 11, 2017
10e13b9
Add search functionality to docs (#128)
jdomingu Feb 11, 2017
562a54e
Added the ability to create and modify fields, including aliases and …
KernpunktAnalytics Feb 16, 2017
c7a2926
Enabling Zip64 Extension to support zipfile >- 2GB. (#144)
doulam Aug 14, 2017
d342cbe
Update test TDS to have a field with no local-type and apply a defaul…
t8y8 Feb 15, 2018
88361b5
adding oracle param support related to #137 in development branch (#152)
May 2, 2018
27d383b
removing gemlock file for security reasons
graysonarts Oct 10, 2018
20e73b9
Updating copyright date
d45 Feb 28, 2020
e137a42
Merge pull request #173 from tableau/d45_copyright_update
d45 Mar 4, 2020
cd4369c
Update datasource.py
martydertz Mar 9, 2020
9a98337
Update datasource.py
martydertz Mar 9, 2020
65205fe
add shape property
dev-mkc19 Apr 25, 2020
ca64256
updating with legal and privacy links
d45 May 19, 2020
e72e07a
Update main.css
d45 May 19, 2020
178d2b5
Add docs link to Readme
jdomingu Nov 3, 2016
c5762b0
Remove diff line
jdomingu Nov 3, 2016
1ca62e7
Fix link typo...
jdomingu Nov 3, 2016
72fefde
Add analytics script
jdomingu Dec 23, 2016
9f81239
add support badge
benlower Oct 6, 2017
6a05f05
move badges up
benlower Oct 6, 2017
a0be6dd
add dbclass name for Cisco Information Server (#140)
carlsonp Feb 16, 2018
7befcb4
adding oracle param support related to #137 (#149)
Apr 30, 2018
885afad
Revert "adding oracle param support related to #137 (#149)" (#150)
t8y8 Apr 30, 2018
f6dbfe9
Update .travis.yml (#170)
jacalata Nov 5, 2019
cf20cfc
Update bootstrap, edit readme
jacalata Nov 4, 2019
f64c15f
bump bootstrap includes
jacalata Nov 4, 2019
009a47f
add back analytics script from merge
jacalata May 27, 2021
7b5d41f
added link to dev guide
Mar 10, 2017
8d2ec76
added reference to developer guide in contributing.md
Mar 10, 2017
427b8eb
added reference to using the development branch
Mar 10, 2017
cbc027b
add tests for preserving xml namespace
jacalata May 29, 2021
c8466d4
remove python 2 and workarounds
jacalata May 29, 2021
f670634
Update README.md
jacalata Jun 4, 2021
16b7bbe
add basic sample with one namespace
jacalata May 29, 2021
9690133
Merge pull request #201 from tableau/add-namespace-samples
jacalata Jun 7, 2021
661d329
Merge branch 'master' into development
jacalata Jun 7, 2021
70ffc24
Update python-package.yml
jacalata Jun 25, 2021
b959e19
remove whitespace for linter
jacalata Jun 25, 2021
8141596
Define test constants before using them
jacalata Jun 25, 2021
084871b
Merge pull request #179 from martydertz/get-query-string
jacalata Sep 16, 2021
8eb3a59
pycodestyle: extra line
jacalata Sep 16, 2021
576ece2
add shape property
dev-mkc19 Sep 19, 2021
637d5f3
Merge branch 'master' of https://github.com/dev-mkc19/document-api-py…
dev-mkc19 Sep 19, 2021
c5a63ee
fix codestyle
dev-mkc19 Sep 19, 2021
ce2da8d
Merge branch 'master' into development
jacalata Oct 16, 2021
ad90152
Merge pull request #178 from dev-mkc19/master
jacalata Oct 16, 2021
b6b2d30
tweak timelines
jacalata Oct 16, 2021
1770342
Merge pull request #209 from tableau/jac/merge-mkc
jacalata Oct 16, 2021
56bdf97
add list of dashboard names to workbook object
jacalata Oct 16, 2021
8e69bb7
pycodestyle
jacalata Oct 16, 2021
395bbe6
Merge pull request #210 from tableau/jac/dashboards
jacalata Oct 16, 2021
b393fdd
changelog, version bump
jacalata Oct 16, 2021
4ba6c55
Update documentation according to code
dev-mkc19 Nov 1, 2021
6177826
add release process to docs
jacalata Dec 16, 2021
cd7e5d4
Merge branch 'temp-merging' into development
jacalata Dec 16, 2021
5a4c58f
Merge pull request #211 from dev-mkc19/development
jacalata Dec 16, 2021
85c1b5c
Update documentation according to code
dev-mkc19 Nov 1, 2021
cf80554
Merge pull request #221 from dev-mkc19/20220309_doc_update
jacalata Mar 11, 2022
dbfd2a5
support file with geocoding in it
jacalata Mar 12, 2022
c1cb9f3
add workbook interiors listing
jacalata Mar 12, 2022
5171c39
Fail to load some twbs that are missing expected field attributes
jacalata Mar 12, 2022
6a8e6d5
figure out it's already fixed
jacalata Mar 12, 2022
10d01bf
Update field.py
jacalata Mar 12, 2022
c0830ad
Update filtering.twb
jacalata Mar 12, 2022
26ef555
rename folder
jacalata Mar 12, 2022
7f8fb8b
code format
jacalata Mar 12, 2022
af3af22
fix failure case to still throw as expected
jacalata Mar 12, 2022
b762bbe
add nested calculations to sample doc
jacalata Mar 15, 2022
569cf8f
switch from ElementTree to lxml
jacalata Mar 15, 2022
98c9f81
style
jacalata Mar 15, 2022
780cb88
create new publish-to-pypi action (#225)
jacalata Mar 16, 2022
afbc38c
Merge branch 'jac/lxml' into development
jacalata Mar 16, 2022
9a98042
update workflow files
jacalata May 24, 2022
8cb0bfb
create new publish-to-pypi action (#225)
jacalata Mar 16, 2022
8b65e69
Implement hidden fields (#222)
jacalata Apr 6, 2022
a1a30e7
Jac/add db schema (#223)
jacalata May 17, 2022
cb886bc
Merge branch 'jac/remove-travis' into development
jacalata Jun 17, 2022
fcaafdd
Merge branch 'jac/field-none-type' into development
jacalata Jun 18, 2022
3817608
Merge branch 'temp-merging' into development
jacalata Jun 18, 2022
38ee933
remove bad python versions, codestyle
jacalata Jun 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish to PyPi

on:
workflow_dispatch:
release:
types: [created]

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Package
run: |
python setup.py sdist
python setup.py bdist_wheel


test-deploy:
if: github.ref_type == 'tag' && contains(github.ref_name, 'test')
needs: build
environment:
name: test-pypi
runs-on: ubuntu-latest
steps:
- name: Publish 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/


production-deploy:
needs: build
environment:
name: pypi
runs-on: ubuntu-latest
steps:
- name: Publish 📦 to Real PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://pypi.org/legacy/
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.7, 3.8, 3.9, 3.10]

steps:
- uses: actions/checkout@v2
Expand Down
12 changes: 4 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
## 09 (December 2021)
* Pypi upgraded to Python3

## 08 (October 2021)
* See dashboards in a workbook
* Add shapes property
* Add custom sql
* Drop python 2, add up through 3.9
## 091 (March 2022)
* Add attribute for hidden field

## 09 (December 2021)
* Pypi upgraded to Python3

## 08 (October 2021)
* See dashboards in a workbook
* Add shapes property
* Add custom sql
* Drop python 2, add up through 3.9


## 07 (26 May 2021)
* Fix bug in xfile that overwrote the namespace name when saving a document

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# document-api-python
[![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools) [![Build Status](https://travis-ci.org/tableau/document-api-python.svg?branch=master)](https://travis-ci.org/tableau/document-api-python)
[![Tableau Supported](https://img.shields.io/badge/Support%20Level-Tableau%20Supported-53bd92.svg)](https://www.tableau.com/support-levels-it-and-developer-tools)

This repo contains Python source and example files for the Tableau Document API.

Expand Down Expand Up @@ -29,6 +29,6 @@ Features include:

For Hyper files, take a look a the [Tableau Hyper API](https://help.tableau.com/current/api/hyper_api/en-us/index.html).

We don't yet support creating files from scratch, adding extracts into workbooks or data sources, or updating field information
We don't support creating files from scratch, adding extracts into workbooks or data sources, or updating field information

As of 2021, this SDK no longer supports Python 2.
18 changes: 11 additions & 7 deletions docs/docs/api-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,27 @@ A class representing Tableau Data Sources, embedded in workbook files or in TDS

**Methods:**

save
`Datasource.save(self)` Saves any changes to the datasource to the existing file.

save_as
`Datasource.save_as(self)` Saves any changes to the datasource to a new file specified by the `new_file` parameter.

add_calculation
`Datasource.add_field(self, name, datatype, role, field_type, caption)` Adds a base field object with the given values.

**Properities:**
`Datasource.remove_field(self, field)` Remove a given field.

`Datasource.add_calculation(self, caption, formula, datatype, role, type)` Adds a calculated field with the given values.

**Properties:**

`self.name` Returns string with the name of datasource.

`self.version` Returns string of daatasource's version.

`self.caption` Returns string of user defined name of datasource if exists.

`self.connections` Returns list of connections are used in workbook.
`self.connections` Returns list of connections used in workbook.

`self.fileds` Returns key-value result of field name and their attributes.
`self.fields` Returns key-value result of field name and their attributes.

`self.calculations` Returns calculated field of the workbook.

Expand Down Expand Up @@ -115,7 +119,7 @@ Represents a field in a datasource

`Field.add_alias(self, key, value)` Add an alias for a given display value.

**Properities:**
**Properties:**

`self.name` Returns a string providing a nice name for the field which is derived from the alias, caption, or the id.

Expand Down
2 changes: 1 addition & 1 deletion publish.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

pip install wheel
set -e

rm -rf dist
Expand Down
38 changes: 0 additions & 38 deletions python-package.yml

This file was deleted.

Loading