tableauserverclient 0.33__py3-none-any.whl → 0.34__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.
Files changed (94) hide show
  1. tableauserverclient/__init__.py +28 -22
  2. tableauserverclient/_version.py +3 -3
  3. tableauserverclient/config.py +5 -3
  4. tableauserverclient/models/column_item.py +1 -1
  5. tableauserverclient/models/connection_credentials.py +1 -1
  6. tableauserverclient/models/connection_item.py +6 -6
  7. tableauserverclient/models/custom_view_item.py +29 -6
  8. tableauserverclient/models/data_acceleration_report_item.py +2 -2
  9. tableauserverclient/models/data_alert_item.py +5 -5
  10. tableauserverclient/models/data_freshness_policy_item.py +6 -6
  11. tableauserverclient/models/database_item.py +3 -3
  12. tableauserverclient/models/datasource_item.py +10 -10
  13. tableauserverclient/models/dqw_item.py +1 -1
  14. tableauserverclient/models/favorites_item.py +5 -6
  15. tableauserverclient/models/fileupload_item.py +1 -1
  16. tableauserverclient/models/flow_item.py +6 -6
  17. tableauserverclient/models/flow_run_item.py +3 -3
  18. tableauserverclient/models/group_item.py +4 -4
  19. tableauserverclient/models/groupset_item.py +4 -4
  20. tableauserverclient/models/interval_item.py +9 -9
  21. tableauserverclient/models/job_item.py +8 -8
  22. tableauserverclient/models/linked_tasks_item.py +5 -5
  23. tableauserverclient/models/metric_item.py +5 -5
  24. tableauserverclient/models/pagination_item.py +1 -1
  25. tableauserverclient/models/permissions_item.py +12 -10
  26. tableauserverclient/models/project_item.py +35 -19
  27. tableauserverclient/models/property_decorators.py +12 -11
  28. tableauserverclient/models/reference_item.py +2 -2
  29. tableauserverclient/models/revision_item.py +3 -3
  30. tableauserverclient/models/schedule_item.py +2 -2
  31. tableauserverclient/models/server_info_item.py +26 -6
  32. tableauserverclient/models/site_item.py +69 -3
  33. tableauserverclient/models/subscription_item.py +3 -3
  34. tableauserverclient/models/table_item.py +1 -1
  35. tableauserverclient/models/tableau_auth.py +115 -5
  36. tableauserverclient/models/tableau_types.py +2 -2
  37. tableauserverclient/models/tag_item.py +3 -4
  38. tableauserverclient/models/task_item.py +4 -4
  39. tableauserverclient/models/user_item.py +47 -17
  40. tableauserverclient/models/view_item.py +11 -10
  41. tableauserverclient/models/virtual_connection_item.py +6 -5
  42. tableauserverclient/models/webhook_item.py +6 -6
  43. tableauserverclient/models/workbook_item.py +90 -12
  44. tableauserverclient/namespace.py +1 -1
  45. tableauserverclient/server/__init__.py +2 -1
  46. tableauserverclient/server/endpoint/auth_endpoint.py +65 -8
  47. tableauserverclient/server/endpoint/custom_views_endpoint.py +62 -18
  48. tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py +2 -2
  49. tableauserverclient/server/endpoint/data_alert_endpoint.py +14 -14
  50. tableauserverclient/server/endpoint/databases_endpoint.py +13 -12
  51. tableauserverclient/server/endpoint/datasources_endpoint.py +49 -54
  52. tableauserverclient/server/endpoint/default_permissions_endpoint.py +19 -18
  53. tableauserverclient/server/endpoint/dqw_endpoint.py +9 -9
  54. tableauserverclient/server/endpoint/endpoint.py +19 -21
  55. tableauserverclient/server/endpoint/exceptions.py +23 -7
  56. tableauserverclient/server/endpoint/favorites_endpoint.py +31 -31
  57. tableauserverclient/server/endpoint/fileuploads_endpoint.py +9 -11
  58. tableauserverclient/server/endpoint/flow_runs_endpoint.py +15 -13
  59. tableauserverclient/server/endpoint/flow_task_endpoint.py +2 -2
  60. tableauserverclient/server/endpoint/flows_endpoint.py +30 -29
  61. tableauserverclient/server/endpoint/groups_endpoint.py +18 -17
  62. tableauserverclient/server/endpoint/groupsets_endpoint.py +2 -2
  63. tableauserverclient/server/endpoint/jobs_endpoint.py +7 -7
  64. tableauserverclient/server/endpoint/linked_tasks_endpoint.py +2 -2
  65. tableauserverclient/server/endpoint/metadata_endpoint.py +2 -2
  66. tableauserverclient/server/endpoint/metrics_endpoint.py +10 -10
  67. tableauserverclient/server/endpoint/permissions_endpoint.py +13 -15
  68. tableauserverclient/server/endpoint/projects_endpoint.py +81 -30
  69. tableauserverclient/server/endpoint/resource_tagger.py +14 -13
  70. tableauserverclient/server/endpoint/schedules_endpoint.py +17 -18
  71. tableauserverclient/server/endpoint/server_info_endpoint.py +40 -5
  72. tableauserverclient/server/endpoint/sites_endpoint.py +282 -17
  73. tableauserverclient/server/endpoint/subscriptions_endpoint.py +10 -10
  74. tableauserverclient/server/endpoint/tables_endpoint.py +15 -14
  75. tableauserverclient/server/endpoint/tasks_endpoint.py +8 -8
  76. tableauserverclient/server/endpoint/users_endpoint.py +366 -19
  77. tableauserverclient/server/endpoint/views_endpoint.py +19 -18
  78. tableauserverclient/server/endpoint/virtual_connections_endpoint.py +6 -5
  79. tableauserverclient/server/endpoint/webhooks_endpoint.py +11 -11
  80. tableauserverclient/server/endpoint/workbooks_endpoint.py +647 -61
  81. tableauserverclient/server/filter.py +2 -2
  82. tableauserverclient/server/pager.py +5 -6
  83. tableauserverclient/server/query.py +68 -19
  84. tableauserverclient/server/request_factory.py +37 -36
  85. tableauserverclient/server/request_options.py +123 -145
  86. tableauserverclient/server/server.py +65 -9
  87. tableauserverclient/server/sort.py +2 -2
  88. {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/METADATA +6 -6
  89. tableauserverclient-0.34.dist-info/RECORD +106 -0
  90. {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/WHEEL +1 -1
  91. tableauserverclient-0.33.dist-info/RECORD +0 -106
  92. {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/LICENSE +0 -0
  93. {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/LICENSE.versioneer +0 -0
  94. {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,7 @@ from tableauserverclient.models import WebhookItem, PaginationItem
6
6
 
7
7
  from tableauserverclient.helpers.logging import logger
8
8
 
9
- from typing import List, Optional, TYPE_CHECKING, Tuple
9
+ from typing import Optional, TYPE_CHECKING
10
10
 
11
11
  if TYPE_CHECKING:
12
12
  from ..server import Server
@@ -15,14 +15,14 @@ if TYPE_CHECKING:
15
15
 
16
16
  class Webhooks(Endpoint):
17
17
  def __init__(self, parent_srv: "Server") -> None:
18
- super(Webhooks, self).__init__(parent_srv)
18
+ super().__init__(parent_srv)
19
19
 
20
20
  @property
21
21
  def baseurl(self) -> str:
22
- return "{0}/sites/{1}/webhooks".format(self.parent_srv.baseurl, self.parent_srv.site_id)
22
+ return f"{self.parent_srv.baseurl}/sites/{self.parent_srv.site_id}/webhooks"
23
23
 
24
24
  @api(version="3.6")
25
- def get(self, req_options: Optional["RequestOptions"] = None) -> Tuple[List[WebhookItem], PaginationItem]:
25
+ def get(self, req_options: Optional["RequestOptions"] = None) -> tuple[list[WebhookItem], PaginationItem]:
26
26
  logger.info("Querying all Webhooks on site")
27
27
  url = self.baseurl
28
28
  server_response = self.get_request(url, req_options)
@@ -35,8 +35,8 @@ class Webhooks(Endpoint):
35
35
  if not webhook_id:
36
36
  error = "Webhook ID undefined."
37
37
  raise ValueError(error)
38
- logger.info("Querying single webhook (ID: {0})".format(webhook_id))
39
- url = "{0}/{1}".format(self.baseurl, webhook_id)
38
+ logger.info(f"Querying single webhook (ID: {webhook_id})")
39
+ url = f"{self.baseurl}/{webhook_id}"
40
40
  server_response = self.get_request(url)
41
41
  return WebhookItem.from_response(server_response.content, self.parent_srv.namespace)[0]
42
42
 
@@ -45,9 +45,9 @@ class Webhooks(Endpoint):
45
45
  if not webhook_id:
46
46
  error = "Webhook ID undefined."
47
47
  raise ValueError(error)
48
- url = "{0}/{1}".format(self.baseurl, webhook_id)
48
+ url = f"{self.baseurl}/{webhook_id}"
49
49
  self.delete_request(url)
50
- logger.info("Deleted single webhook (ID: {0})".format(webhook_id))
50
+ logger.info(f"Deleted single webhook (ID: {webhook_id})")
51
51
 
52
52
  @api(version="3.6")
53
53
  def create(self, webhook_item: WebhookItem) -> WebhookItem:
@@ -56,7 +56,7 @@ class Webhooks(Endpoint):
56
56
  server_response = self.post_request(url, create_req)
57
57
  new_webhook = WebhookItem.from_response(server_response.content, self.parent_srv.namespace)[0]
58
58
 
59
- logger.info("Created new webhook (ID: {0})".format(new_webhook.id))
59
+ logger.info(f"Created new webhook (ID: {new_webhook.id})")
60
60
  return new_webhook
61
61
 
62
62
  @api(version="3.6")
@@ -64,7 +64,7 @@ class Webhooks(Endpoint):
64
64
  if not webhook_id:
65
65
  error = "Webhook ID undefined."
66
66
  raise ValueError(error)
67
- url = "{0}/{1}/test".format(self.baseurl, webhook_id)
67
+ url = f"{self.baseurl}/{webhook_id}/test"
68
68
  testOutcome = self.get_request(url)
69
- logger.info("Testing webhook (ID: {0} returned {1})".format(webhook_id, testOutcome))
69
+ logger.info(f"Testing webhook (ID: {webhook_id} returned {testOutcome})")
70
70
  return testOutcome