Registry / data / tableaudocumentapi

tableaudocumentapi

JSON →
library0.11pypypiunverified

A Python module for working with Tableau workbook (TWB) and datasource (TDS) files, including packaged formats (TWBX, TDSX). It allows programmatic editing of connections, fields, dashboards, sheets, and custom SQL. Current version 0.11, with occasional releases.

pip install tableaudocumentapi
INSTALL
IMPORT
SIG · TABLEAUDOCUMENTAPI
T
tableaudocumentapi
datapythonv0.11
Install
3.2s avg
Import
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.2s · import 0.000s · 32MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TableauDocument
from tableaudocumentapi import TableauDocument
from tableauserverclient import Server

Open a Tableau packaged workbook, inspect and modify database connections, then save as a new file.

from tableaudocumentapi import Workbook wb = Workbook('sample.twbx') for ds in wb.datasources: for conn in ds.connections: print(f'DB: {conn.dbname}, Server: {conn.server}') conn.server = 'new-server.example.com' wb.save_as('output.twbx')
Debug
Known issues
breakingSaving a workbook modifies namespaces; if you open and save a file without changes, the XML namespace may change, causing Tableau to treat it as a different version. Always test saved files.
fix
Upgrade to 0.7+ which fixed namespace preservation, or verify saved file opens correctly in Tableau.
affects: <0.7
gotchaPackaged (twbx/tdsx) files are zipped; the library extracts them to a temporary directory. Ensure sufficient disk space and that the temporary directory is writable.
fix
Monitor temp space; use tempfile.gettempdir() to check location.
affects: all
gotchaThe library does not support editing of dashboard layout or worksheet calculations. Attempting to modify dashboard objects may silently fail.
fix
Only use documented properties (see class attributes).
affects: all
Upgrade
Version history
0.11latest on PyPI · released Nov 7, 2022
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
tableaudocumentapi — pip install tableaudocumentapi · libregistry