tableauserverclient 0.29__py3-none-any.whl → 0.30__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2024-01-14T00:38:52+1100",
11
+ "date": "2024-01-19T11:30:24-0800",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "0e46e15fc80c2d4492d9580f111a768536f6afaa",
15
- "version": "0.29"
14
+ "full-revisionid": "f84d7d5302344f0a4ac369c501b122931ae7e79e",
15
+ "version": "0.30"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -69,7 +69,7 @@ class HourlyInterval(object):
69
69
 
70
70
  @interval.setter
71
71
  def interval(self, intervals):
72
- VALID_INTERVALS = {0.25, 0.5, 1, 2, 4, 6, 8, 12}
72
+ VALID_INTERVALS = {0.25, 0.5, 1, 2, 4, 6, 8, 12, 24}
73
73
  for interval in intervals:
74
74
  # if an hourly interval is a string, then it is a weekDay interval
75
75
  if isinstance(interval, str) and not interval.isnumeric() and not hasattr(IntervalItem.Day, interval):
@@ -1,5 +1,3 @@
1
- from threading import Thread
2
- from time import sleep
3
1
  from tableauserverclient import datetime_helpers as datetime
4
2
 
5
3
  from packaging.version import Version
@@ -76,55 +74,20 @@ class Endpoint(object):
76
74
  return parameters
77
75
 
78
76
  def _blocking_request(self, method, url, parameters={}) -> Optional[Union["Response", Exception]]:
79
- self.async_response = None
80
77
  response = None
81
78
  logger.debug("[{}] Begin blocking request to {}".format(datetime.timestamp(), url))
82
79
  try:
83
80
  response = method(url, **parameters)
84
- self.async_response = response
85
81
  logger.debug("[{}] Call finished".format(datetime.timestamp()))
86
82
  except Exception as e:
87
83
  logger.debug("Error making request to server: {}".format(e))
88
- self.async_response = e
89
- finally:
90
- if response and not self.async_response:
91
- logger.debug("Request response not saved")
92
- return None
93
- logger.debug("[{}] Request complete".format(datetime.timestamp()))
94
- return self.async_response
84
+ raise e
85
+ return response
95
86
 
96
87
  def send_request_while_show_progress_threaded(
97
88
  self, method, url, parameters={}, request_timeout=None
98
89
  ) -> Optional[Union["Response", Exception]]:
99
- try:
100
- request_thread = Thread(target=self._blocking_request, args=(method, url, parameters))
101
- request_thread.start()
102
- except Exception as e:
103
- logger.debug("Error starting server request on separate thread: {}".format(e))
104
- return None
105
- seconds = 0.05
106
- minutes = 0
107
- last_log_minute = 0
108
- sleep(seconds)
109
- if self.async_response is not None:
110
- # a quick return for any immediate responses
111
- return self.async_response
112
- timed_out: bool = request_timeout is not None and seconds > request_timeout
113
- while (self.async_response is None) and not timed_out:
114
- sleep(DELAY_SLEEP_SECONDS)
115
- seconds = seconds + DELAY_SLEEP_SECONDS
116
- minutes = int(seconds / 60)
117
- last_log_minute = self.log_wait_time(minutes, last_log_minute, url)
118
- return self.async_response
119
-
120
- def log_wait_time(self, minutes, last_log_minute, url) -> int:
121
- logger.debug("{} Waiting....".format(datetime.timestamp()))
122
- if minutes > last_log_minute: # detailed log message ~every minute
123
- logger.info("[{}] Waiting ({} minutes so far) for request to {}".format(datetime.timestamp(), minutes, url))
124
- last_log_minute = minutes
125
- else:
126
- logger.debug("[{}] Waiting for request to {}".format(datetime.timestamp(), url))
127
- return last_log_minute
90
+ return self._blocking_request(method, url, parameters)
128
91
 
129
92
  def _make_request(
130
93
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tableauserverclient
3
- Version: 0.29
3
+ Version: 0.30
4
4
  Summary: A Python module for working with the Tableau Server REST API.
5
5
  Author-email: Tableau <github@tableau.com>
6
6
  License: The MIT License (MIT)
@@ -1,5 +1,5 @@
1
1
  tableauserverclient/__init__.py,sha256=hDjLTdwXPmQj4BQBRdUcnP7XdhT7apJ_c7JAPyyYZ7Y,1096
2
- tableauserverclient/_version.py,sha256=KhL5CD7tzLBzduk7x_vggt-OGe_KkxkcgCnLbAQjNho,496
2
+ tableauserverclient/_version.py,sha256=1DZOBnxMpAUaNuob4jPBOvm74gFOHdcIzHXiKW4g43M,496
3
3
  tableauserverclient/config.py,sha256=frumJjDxOQug_R54kjrnHLyaIgg1bV7aUoNPHMJlBhc,430
4
4
  tableauserverclient/datetime_helpers.py,sha256=_-gWz5I2_KHT5AzW_boD8meH6loTTKdK-_62h1MA6ko,884
5
5
  tableauserverclient/exponential_backoff.py,sha256=HtAfbbVnYtiOe2_ZzKqZmsml40EDZBaC3bttif5qeG8,1474
@@ -26,7 +26,7 @@ tableauserverclient/models/fileupload_item.py,sha256=tx3LfgRxVqeHGpCN6kTDPkdBY5i
26
26
  tableauserverclient/models/flow_item.py,sha256=rPIVDe8_tHied8TDRiGpg2gyTyQWlNiGb3vGhqF9YJw,7320
27
27
  tableauserverclient/models/flow_run_item.py,sha256=pwJNz0m7l--Sb6z0o83ebWfAmTVFYSr-0apMxHWt0Vs,3139
28
28
  tableauserverclient/models/group_item.py,sha256=1KP_KmIG1veJJGyte82aFvMAiU_tvzYtaP2vLEReLoo,3621
29
- tableauserverclient/models/interval_item.py,sha256=yDIytwU53_OhN0nytGM_GObEpmqWVeLqh3iyAbk3ZE0,9049
29
+ tableauserverclient/models/interval_item.py,sha256=uSYQskXWlPFoQHC2wz58j6G93qhVKepMTYeWW9FbGaY,9053
30
30
  tableauserverclient/models/job_item.py,sha256=PMt7G2qu8WAxe-b3f_0BtQ9JcCSvk-g5L5EcOUpYFCY,8619
31
31
  tableauserverclient/models/metric_item.py,sha256=Zrzi_Un43p2jzE_4OhetxhjfeSUYzotMfm8Hjd5WOhI,5397
32
32
  tableauserverclient/models/pagination_item.py,sha256=Hdr2EIKWkXfrjWOr-Ao_vzQTWB2akUfxxtaupFKLrlQ,1432
@@ -67,7 +67,7 @@ tableauserverclient/server/endpoint/databases_endpoint.py,sha256=0V6cHwF5E1K1oQ9
67
67
  tableauserverclient/server/endpoint/datasources_endpoint.py,sha256=XjoPiejyCGIze6gMO_ALZGWS44vFJ8LxroYr7Xq1OXE,20407
68
68
  tableauserverclient/server/endpoint/default_permissions_endpoint.py,sha256=HQSYPIJwVCimuWo4YGYvsc41_-rweLHmJ-tQrWdH-Y8,4386
69
69
  tableauserverclient/server/endpoint/dqw_endpoint.py,sha256=TvzjonvIiGtp4EisoBKms1lHOkVTjagQACw6unyY9_8,2418
70
- tableauserverclient/server/endpoint/endpoint.py,sha256=jjZbvukrkomHQeAJVFbLBJgq7is0EA6a76Xzr4kCxo8,14498
70
+ tableauserverclient/server/endpoint/endpoint.py,sha256=8-XteqZmfuHDyqR_mGSXKZm9esWbeybaZByHEZoBEac,12743
71
71
  tableauserverclient/server/endpoint/exceptions.py,sha256=fh4fFYasqiKd3EPTxriVsmLkRL24wz9UvX94BMRfyLY,2534
72
72
  tableauserverclient/server/endpoint/favorites_endpoint.py,sha256=D0MCco9kxaeCShfWOnVt3UpttJRgczJmJKXb3w0jpw4,6701
73
73
  tableauserverclient/server/endpoint/fileuploads_endpoint.py,sha256=fh2xH6a8mMcBI14QzodWPBMabK1_9SMDbzZbawz-ZJc,2553
@@ -90,9 +90,9 @@ tableauserverclient/server/endpoint/users_endpoint.py,sha256=QRoApMyP53nF-AqvC7o
90
90
  tableauserverclient/server/endpoint/views_endpoint.py,sha256=GIYPftL5B0YUOb_SisFtfLP0LPIAbbUv24XCi15UH_M,7118
91
91
  tableauserverclient/server/endpoint/webhooks_endpoint.py,sha256=-HsbAuKECNcx5EZkqp097PfGHLCNwPRnxbrdzreTpnM,2835
92
92
  tableauserverclient/server/endpoint/workbooks_endpoint.py,sha256=_Tfaioe4QBA7VyswtxRu8uL-CzIK0wtslkwj41Wdx_4,21879
93
- tableauserverclient-0.29.dist-info/LICENSE,sha256=MMkY7MguOb4L-WCmmqrVcwg2iwSGaz-RfAMFvXRXwsQ,1074
94
- tableauserverclient-0.29.dist-info/LICENSE.versioneer,sha256=OYaGozOXk7bUNSm1z577iDYpti8a40XIqqR4lyQ47D8,334
95
- tableauserverclient-0.29.dist-info/METADATA,sha256=rLRiTqsKYowp9yVGVtZGf7_yAzrfgeLb6vULz93_V8M,4073
96
- tableauserverclient-0.29.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
97
- tableauserverclient-0.29.dist-info/top_level.txt,sha256=kBnL39G2RlGqxJSsShDBWG4WZ3NFcWJkv1EGiOfZh4Q,20
98
- tableauserverclient-0.29.dist-info/RECORD,,
93
+ tableauserverclient-0.30.dist-info/LICENSE,sha256=MMkY7MguOb4L-WCmmqrVcwg2iwSGaz-RfAMFvXRXwsQ,1074
94
+ tableauserverclient-0.30.dist-info/LICENSE.versioneer,sha256=OYaGozOXk7bUNSm1z577iDYpti8a40XIqqR4lyQ47D8,334
95
+ tableauserverclient-0.30.dist-info/METADATA,sha256=K7aLh-r1p6dPxb6juSz5gB-fTepGAJOaVzeDABBuk9M,4073
96
+ tableauserverclient-0.30.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
97
+ tableauserverclient-0.30.dist-info/top_level.txt,sha256=kBnL39G2RlGqxJSsShDBWG4WZ3NFcWJkv1EGiOfZh4Q,20
98
+ tableauserverclient-0.30.dist-info/RECORD,,