tableau_tools 4.0.0 is released!

I’m very excited to announce the release of tableau_tools 4.0.0, available now on GitHub and PyPi! tableau_tools is a single library to make administrating a Tableau Server and the content on that server as simple as possible. It is written in Python 2.7 with the aim to eventually become compatible with Python 3. It is also intended to server all versions of Tableau Server from 9.0 – current release.

The 4.0 release is almost a complete rewrite, with a focus on full implementation of the Tableau Server REST API through API Version 2.6, simplification of methods throughout, and advanced capabilities for publishing from templates. The capabilities of tableau_tools are beyond the current capabilities of the Tableau Server-Client Library and Document API, and I recommend you use it over them at this time.

4.0 is different enough from the previous versions that all previous versions of tableau_tools are now deprecated, and I will be removing their documentation from the tableauandbehold.com website to remove any confusion.

There are plenty of example scripts included in the package, which you can see at GitHub…

The README is a full guide to using the library, and should be read when beginning. As before, tableau_tools was programmed using PyCharm and is designed to provide optimal code completion when using PyCharm. Your life will be a lot easier if you do.

tableau_tools README

A list of all the major changes, which won’t matter if you are just getting started:

  • Up to date for version 10.3 / API version 2.6: All methods from all versions are now supported
  • tableau_documents updated to handle version 10 style data sources with cross-database connections.
    • Vastly simplified model of: TableauFile->TableauDocument (Datasource or Workbook)->Datasources->Connections
    • Most getter/setters replaced with properties
    • Merging of the DatasourceGenerator with the actual TableauDatasource class so that single class can work with existing datasources to modify or build one entirely from scratch
    • Improved handling of large workbooks and datasources
  • Massive cleanup of all REST API methods: There is now one method to do anything related to that action, with optional parameters if you need more specificity.
  • Name vs. LUID lookup built in: Every method that can autodetects whether a LUID is being passed, and if not, does a name lookup automatically. You can use real names in almost every method without having to do the lookup first
  • Versioning handled by subclass inheritance. “What is this?” you may be asking. Basically, tableau_tools now implements each new version of the Tableau REST API as a subclass of the previous class, so it retains all features of the older versions, while adding new methods and updating those that have new features. Subclasses for versions are named like: TableauRestApiConnection23 or TableauRestApiConnection26
  • All permissions are handled through the PublishedContent classes: Project, Workbook, Datasource
    • All work on Projects is handled through a Project object.
    • Workbooks and Datasources still require requesting their PublishedContent objects
    • GranteeCapabilities object renamed to Permissions
    • Changes to Permissions must be accomplished via Permissions object
  • lxml removed and replaced fully with Python standard library ElementTree. No more need to install lxml binaries on Windows!
  • All XML requests are now built via ElementTree rather than as text strings
  • docstring typing for all parameters and returns. If there’s no docstring, the method hasn’t been updated yet. This means PyCharm or your other IDE can tell if you are passing in the right types to a given method. Some people will complain this is less Pythonic, but I promise type-safety is incredibly useful

Future goals for the 4.X series:

  • Python 3.3 compatibility
  • Using the requests library for HTTP calls (if there is any benefit, might be worth it for Python 3)
Advertisements

17 comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s