Skip to content

Conversation

@graysonarts
Copy link
Contributor

No description provided.

t8y8 and others added 30 commits November 2, 2016 16:06
* GET and POST tests verify headers, body, and query strings coming from `Endpoint`
Added a new sample (Initialize Server) and added instructions to the
readme for how to add new features to the project.
* First cut at API docs

* Update jquery version for bootstrap compatibility

* Incorporate review feedback

* Add pagination docs

* Add dev guide

* Add docs for populating views and connections

* Continue adding to api ref

* Edits for existing content

* Update readme to point to docs

* Incorporate edits from PR
Initial implementation to address #102 and provide datetime objects
Large responses were being read into memory. For most calls that's fine, but download could cause the python process to go out of memory due to holding large workbooks or datasources all in memory before writing to disk.

Requests has a feature called `iter_content` which when used in combination with `stream=True` on a request will download only the headers, allow us to determine the filename, and then read through the response body in chunks. I picked a size of 1024 bytes, since that's what most of the internet appears to use and I noticed little perf difference between a 1024 byte chunk size and a 1MB chunk size.

This is all enabled by exposing the `parameters` argument to `requests.get` by pluming it through our wrapper functions. All tests pass, and manual testing showed the memory problem went away.
* Add support for the oAuth flag when publishing workbooks and data sources
This sample shows how to migrate workbooks from one site to another and
change their datasources using the Tableau Document API
Yaay hackathon!

This PR adds the ability to detect the highest supported version a given Tableau Server supports. In 10.1 and later this makes use of the `ServerInfo` endpoint, and in others it falls back to `auth.xml` which is guaranteed to be present on all versions of Server that we would care about.

If we can't determine the version for some reason, we default to 2.1, which is the last 'major' release of the API (with permissions semantics changes).
This currently doesn't have an auto-upgrade flag, that can come in another PR after more discussion
#124)

* Add annotation for endpoints to indicate minimum supported API version

`endpoint.py` gets a new decorator called `api` that takes a version parameter. This gets normalized and then will check `Server.version` before making the API call. If you are calling an endpoint that is newer than the server version you get a nice error message before it even tries a request against the server!

This can be extended in the future to be more complex (eg building a registry of supported methods, etc) but for now this is a huge usability win rather than throwning a Server-returned 404!

This PR only adds the decorator, actually identifying the minimum for endpoints will be done in a different PR that needs way more manual testing than this did
* GET and POST tests verify headers, body, and query strings coming from `Endpoint`
Added a new sample (Initialize Server) and added instructions to the
readme for how to add new features to the project.
* First cut at API docs

* Update jquery version for bootstrap compatibility

* Incorporate review feedback

* Add pagination docs

* Add dev guide

* Add docs for populating views and connections

* Continue adding to api ref

* Edits for existing content

* Update readme to point to docs

* Incorporate edits from PR
Large responses were being read into memory. For most calls that's fine, but download could cause the python process to go out of memory due to holding large workbooks or datasources all in memory before writing to disk.

Requests has a feature called `iter_content` which when used in combination with `stream=True` on a request will download only the headers, allow us to determine the filename, and then read through the response body in chunks. I picked a size of 1024 bytes, since that's what most of the internet appears to use and I noticed little perf difference between a 1024 byte chunk size and a 1MB chunk size.

This is all enabled by exposing the `parameters` argument to `requests.get` by pluming it through our wrapper functions. All tests pass, and manual testing showed the memory problem went away.
hugoboos and others added 10 commits January 11, 2017 11:44
* Add support for the oAuth flag when publishing workbooks and data sources
This sample shows how to migrate workbooks from one site to another and
change their datasources using the Tableau Document API
Yaay hackathon!

This PR adds the ability to detect the highest supported version a given Tableau Server supports. In 10.1 and later this makes use of the `ServerInfo` endpoint, and in others it falls back to `auth.xml` which is guaranteed to be present on all versions of Server that we would care about.

If we can't determine the version for some reason, we default to 2.1, which is the last 'major' release of the API (with permissions semantics changes).
This currently doesn't have an auto-upgrade flag, that can come in another PR after more discussion
#124)

* Add annotation for endpoints to indicate minimum supported API version

`endpoint.py` gets a new decorator called `api` that takes a version parameter. This gets normalized and then will check `Server.version` before making the API call. If you are calling an endpoint that is newer than the server version you get a nice error message before it even tries a request against the server!

This can be extended in the future to be more complex (eg building a registry of supported methods, etc) but for now this is a huge usability win rather than throwning a Server-returned 404!

This PR only adds the decorator, actually identifying the minimum for endpoints will be done in a different PR that needs way more manual testing than this did
@graysonarts graysonarts changed the title Release 0.6 Release 0.3 Jan 11, 2017
@graysonarts graysonarts merged commit 8e6c907 into master Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants