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.
- tableauserverclient/__init__.py +28 -22
- tableauserverclient/_version.py +3 -3
- tableauserverclient/config.py +5 -3
- tableauserverclient/models/column_item.py +1 -1
- tableauserverclient/models/connection_credentials.py +1 -1
- tableauserverclient/models/connection_item.py +6 -6
- tableauserverclient/models/custom_view_item.py +29 -6
- tableauserverclient/models/data_acceleration_report_item.py +2 -2
- tableauserverclient/models/data_alert_item.py +5 -5
- tableauserverclient/models/data_freshness_policy_item.py +6 -6
- tableauserverclient/models/database_item.py +3 -3
- tableauserverclient/models/datasource_item.py +10 -10
- tableauserverclient/models/dqw_item.py +1 -1
- tableauserverclient/models/favorites_item.py +5 -6
- tableauserverclient/models/fileupload_item.py +1 -1
- tableauserverclient/models/flow_item.py +6 -6
- tableauserverclient/models/flow_run_item.py +3 -3
- tableauserverclient/models/group_item.py +4 -4
- tableauserverclient/models/groupset_item.py +4 -4
- tableauserverclient/models/interval_item.py +9 -9
- tableauserverclient/models/job_item.py +8 -8
- tableauserverclient/models/linked_tasks_item.py +5 -5
- tableauserverclient/models/metric_item.py +5 -5
- tableauserverclient/models/pagination_item.py +1 -1
- tableauserverclient/models/permissions_item.py +12 -10
- tableauserverclient/models/project_item.py +35 -19
- tableauserverclient/models/property_decorators.py +12 -11
- tableauserverclient/models/reference_item.py +2 -2
- tableauserverclient/models/revision_item.py +3 -3
- tableauserverclient/models/schedule_item.py +2 -2
- tableauserverclient/models/server_info_item.py +26 -6
- tableauserverclient/models/site_item.py +69 -3
- tableauserverclient/models/subscription_item.py +3 -3
- tableauserverclient/models/table_item.py +1 -1
- tableauserverclient/models/tableau_auth.py +115 -5
- tableauserverclient/models/tableau_types.py +2 -2
- tableauserverclient/models/tag_item.py +3 -4
- tableauserverclient/models/task_item.py +4 -4
- tableauserverclient/models/user_item.py +47 -17
- tableauserverclient/models/view_item.py +11 -10
- tableauserverclient/models/virtual_connection_item.py +6 -5
- tableauserverclient/models/webhook_item.py +6 -6
- tableauserverclient/models/workbook_item.py +90 -12
- tableauserverclient/namespace.py +1 -1
- tableauserverclient/server/__init__.py +2 -1
- tableauserverclient/server/endpoint/auth_endpoint.py +65 -8
- tableauserverclient/server/endpoint/custom_views_endpoint.py +62 -18
- tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py +2 -2
- tableauserverclient/server/endpoint/data_alert_endpoint.py +14 -14
- tableauserverclient/server/endpoint/databases_endpoint.py +13 -12
- tableauserverclient/server/endpoint/datasources_endpoint.py +49 -54
- tableauserverclient/server/endpoint/default_permissions_endpoint.py +19 -18
- tableauserverclient/server/endpoint/dqw_endpoint.py +9 -9
- tableauserverclient/server/endpoint/endpoint.py +19 -21
- tableauserverclient/server/endpoint/exceptions.py +23 -7
- tableauserverclient/server/endpoint/favorites_endpoint.py +31 -31
- tableauserverclient/server/endpoint/fileuploads_endpoint.py +9 -11
- tableauserverclient/server/endpoint/flow_runs_endpoint.py +15 -13
- tableauserverclient/server/endpoint/flow_task_endpoint.py +2 -2
- tableauserverclient/server/endpoint/flows_endpoint.py +30 -29
- tableauserverclient/server/endpoint/groups_endpoint.py +18 -17
- tableauserverclient/server/endpoint/groupsets_endpoint.py +2 -2
- tableauserverclient/server/endpoint/jobs_endpoint.py +7 -7
- tableauserverclient/server/endpoint/linked_tasks_endpoint.py +2 -2
- tableauserverclient/server/endpoint/metadata_endpoint.py +2 -2
- tableauserverclient/server/endpoint/metrics_endpoint.py +10 -10
- tableauserverclient/server/endpoint/permissions_endpoint.py +13 -15
- tableauserverclient/server/endpoint/projects_endpoint.py +81 -30
- tableauserverclient/server/endpoint/resource_tagger.py +14 -13
- tableauserverclient/server/endpoint/schedules_endpoint.py +17 -18
- tableauserverclient/server/endpoint/server_info_endpoint.py +40 -5
- tableauserverclient/server/endpoint/sites_endpoint.py +282 -17
- tableauserverclient/server/endpoint/subscriptions_endpoint.py +10 -10
- tableauserverclient/server/endpoint/tables_endpoint.py +15 -14
- tableauserverclient/server/endpoint/tasks_endpoint.py +8 -8
- tableauserverclient/server/endpoint/users_endpoint.py +366 -19
- tableauserverclient/server/endpoint/views_endpoint.py +19 -18
- tableauserverclient/server/endpoint/virtual_connections_endpoint.py +6 -5
- tableauserverclient/server/endpoint/webhooks_endpoint.py +11 -11
- tableauserverclient/server/endpoint/workbooks_endpoint.py +647 -61
- tableauserverclient/server/filter.py +2 -2
- tableauserverclient/server/pager.py +5 -6
- tableauserverclient/server/query.py +68 -19
- tableauserverclient/server/request_factory.py +37 -36
- tableauserverclient/server/request_options.py +123 -145
- tableauserverclient/server/server.py +65 -9
- tableauserverclient/server/sort.py +2 -2
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/METADATA +6 -6
- tableauserverclient-0.34.dist-info/RECORD +106 -0
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/WHEEL +1 -1
- tableauserverclient-0.33.dist-info/RECORD +0 -106
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/LICENSE +0 -0
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.34.dist-info}/LICENSE.versioneer +0 -0
- {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
|
|
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(
|
|
18
|
+
super().__init__(parent_srv)
|
|
19
19
|
|
|
20
20
|
@property
|
|
21
21
|
def baseurl(self) -> str:
|
|
22
|
-
return "{
|
|
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) ->
|
|
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: {
|
|
39
|
-
url = "{
|
|
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 = "{
|
|
48
|
+
url = f"{self.baseurl}/{webhook_id}"
|
|
49
49
|
self.delete_request(url)
|
|
50
|
-
logger.info("Deleted single 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: {
|
|
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 = "{
|
|
67
|
+
url = f"{self.baseurl}/{webhook_id}/test"
|
|
68
68
|
testOutcome = self.get_request(url)
|
|
69
|
-
logger.info("Testing webhook (ID: {
|
|
69
|
+
logger.info(f"Testing webhook (ID: {webhook_id} returned {testOutcome})")
|
|
70
70
|
return testOutcome
|