Skip to main content

Tools for extracting metadata from Tableau Desktop workbook files.

Project description

TableauDesktopPy

Tools for extracting metadata from Tableau Desktop workbook files. This package parses the underlying xml of a workbook to retrieve information on its style and data connections.

Installation

Install with pip:

pip install TableauDesktopPy

Usage

  1. Provide a valid Tableau workbook file ('.twb' or '.twbx') to declare a Workbook object:
import TableauDesktopPy as tdp

my_workbook = tdp.Workbook("C:\Users\bpewyllie\test_workbook.twbx")
  1. Then call any of the following attributes to retrieve workbook metadata:
  • Workbook.colors
  • Workbook.custom_sql
  • Workbook.excel
  • Workbook.fonts
  • Workbook.fields
  • Workbook.onedrive
  • Workbook.images
  • Workbook.shapes
  • ... and more
  1. Other metadata may be retrieved by calling the Workbook.xml attribute and parsing with an xml parser such as BeautifulSoup.

  2. The module also provides methods for modifying a workbook's xml. Workbook.hide_field(), for example, hides an arbitrary field from the workbook's xml. To make the changes appear when opening the workbook in Tableau, first call the Workbook.save() method. Currently only saving as a .twb file is supported. To prevent confusion, it is best to run this method with the workbook closed.

Release notes

1.0.9 (1/22/2021)

  • Address README template not being accessible

1.0.8 (1/21/2021)

  • Include datasource in parenthetical in any field-related attribute to overcome duplicate-named fields from different datasources

  • Create method for building workbook README file

  • Create save method for overwriting workbooks

  • Create method for changing fonts

  • Fix some bugs with retrieving field names when parameters are present

To do (for release 1.1.0)

  • Ability to save workbooks to .twbx files

  • Create worksheet, datasource subclasses (long-term goal: allow more precise manipulation)

  • Create method for changing file paths of images and data files

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TableauDesktopPy-1.0.9.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

TableauDesktopPy-1.0.9-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file TableauDesktopPy-1.0.9.tar.gz.

File metadata

  • Download URL: TableauDesktopPy-1.0.9.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for TableauDesktopPy-1.0.9.tar.gz
Algorithm Hash digest
SHA256 eb6fa5a359d70d6fb7efe9e0d9cd015835e9f8b01a775e1846683567490e6181
MD5 66895d65ab6b05adb425a429dfec2486
BLAKE2b-256 444947dace5687335bc015b5657def20b89aec941b2f5f6e326859bcaf00b077

See more details on using hashes here.

File details

Details for the file TableauDesktopPy-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: TableauDesktopPy-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for TableauDesktopPy-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d01bb3c75797e8ff93cdf6b624688021eb853dc1cea8ef12f21cbd76441d4fd5
MD5 338820e5563faff2a608f7012a8df1bd
BLAKE2b-256 5fe3865c4c25be61f150857cdf04bdbfdc274f9f9608ec3b4215f8c335d7bb17

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page