tableau_tools 4.0 is coming soon

I don’t normally post about things before they are ready, but tableau_tools 4.0 is getting close to release, and I am excited about how much it has improved. This is the big one, and if will probably break all your old scripts, so get ready for some cleanup, but I promise it is worth it.

The 4.0.0 branch is available on GitHub, and you can preview the README files now

tableau_rest_api README

Here are all the big changes:

  • 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

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