tableauserverclient 0.36__py3-none-any.whl → 0.37__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 +2 -0
- tableauserverclient/bin/_version.py +3 -3
- tableauserverclient/models/connection_item.py +3 -3
- tableauserverclient/models/datasource_item.py +108 -21
- tableauserverclient/models/job_item.py +1 -0
- tableauserverclient/server/__init__.py +2 -0
- tableauserverclient/server/endpoint/datasources_endpoint.py +559 -4
- tableauserverclient/server/endpoint/exceptions.py +4 -0
- tableauserverclient/server/endpoint/fileuploads_endpoint.py +1 -1
- tableauserverclient/server/endpoint/groupsets_endpoint.py +2 -2
- tableauserverclient/server/endpoint/jobs_endpoint.py +1 -1
- tableauserverclient/server/endpoint/views_endpoint.py +5 -1
- tableauserverclient/server/endpoint/workbooks_endpoint.py +24 -10
- tableauserverclient/server/request_factory.py +11 -5
- tableauserverclient/server/request_options.py +34 -0
- {tableauserverclient-0.36.dist-info → tableauserverclient-0.37.dist-info}/METADATA +3 -2
- {tableauserverclient-0.36.dist-info → tableauserverclient-0.37.dist-info}/RECORD +21 -21
- {tableauserverclient-0.36.dist-info → tableauserverclient-0.37.dist-info}/WHEEL +1 -1
- {tableauserverclient-0.36.dist-info → tableauserverclient-0.37.dist-info/licenses}/LICENSE +0 -0
- {tableauserverclient-0.36.dist-info → tableauserverclient-0.37.dist-info/licenses}/LICENSE.versioneer +0 -0
- {tableauserverclient-0.36.dist-info → tableauserverclient-0.37.dist-info}/top_level.txt +0 -0
tableauserverclient/__init__.py
CHANGED
|
@@ -56,6 +56,7 @@ from tableauserverclient.server import (
|
|
|
56
56
|
ExcelRequestOptions,
|
|
57
57
|
ImageRequestOptions,
|
|
58
58
|
PDFRequestOptions,
|
|
59
|
+
PPTXRequestOptions,
|
|
59
60
|
RequestOptions,
|
|
60
61
|
MissingRequiredFieldError,
|
|
61
62
|
FailedSignInError,
|
|
@@ -107,6 +108,7 @@ __all__ = [
|
|
|
107
108
|
"Pager",
|
|
108
109
|
"PaginationItem",
|
|
109
110
|
"PDFRequestOptions",
|
|
111
|
+
"PPTXRequestOptions",
|
|
110
112
|
"Permission",
|
|
111
113
|
"PermissionsRule",
|
|
112
114
|
"PersonalAccessTokenAuth",
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-03-24T09:59:27-0700",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "0.
|
|
14
|
+
"full-revisionid": "bf857041ed16dccf9c2aa494dbd0e6a6e6a62d66",
|
|
15
|
+
"version": "0.37"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -103,11 +103,11 @@ class ConnectionItem:
|
|
|
103
103
|
all_connection_xml = parsed_response.findall(".//t:connection", namespaces=ns)
|
|
104
104
|
for connection_xml in all_connection_xml:
|
|
105
105
|
connection_item = cls()
|
|
106
|
-
connection_item._id = connection_xml.get("id", None)
|
|
106
|
+
connection_item._id = connection_xml.get("id", connection_xml.get("connectionId", None))
|
|
107
107
|
connection_item._connection_type = connection_xml.get("type", connection_xml.get("dbClass", None))
|
|
108
108
|
connection_item.embed_password = string_to_bool(connection_xml.get("embedPassword", ""))
|
|
109
|
-
connection_item.server_address = connection_xml.get("serverAddress", None)
|
|
110
|
-
connection_item.server_port = connection_xml.get("serverPort", None)
|
|
109
|
+
connection_item.server_address = connection_xml.get("serverAddress", connection_xml.get("server", None))
|
|
110
|
+
connection_item.server_port = connection_xml.get("serverPort", connection_xml.get("port", None))
|
|
111
111
|
connection_item.username = connection_xml.get("userName", None)
|
|
112
112
|
connection_item._query_tagging = (
|
|
113
113
|
string_to_bool(s) if (s := connection_xml.get("queryTagging", None)) else None
|
|
@@ -19,6 +19,93 @@ from tableauserverclient.models.tag_item import TagItem
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class DatasourceItem:
|
|
22
|
+
"""
|
|
23
|
+
Represents a Tableau datasource item.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
project_id : Optional[str]
|
|
28
|
+
The project ID that the datasource belongs to.
|
|
29
|
+
|
|
30
|
+
name : Optional[str]
|
|
31
|
+
The name of the datasource.
|
|
32
|
+
|
|
33
|
+
Attributes
|
|
34
|
+
----------
|
|
35
|
+
ask_data_enablement : Optional[str]
|
|
36
|
+
Determines if a data source allows use of Ask Data. The value can be
|
|
37
|
+
TSC.DatasourceItem.AskDataEnablement.Enabled,
|
|
38
|
+
TSC.DatasourceItem.AskDataEnablement.Disabled, or
|
|
39
|
+
TSC.DatasourceItem.AskDataEnablement.SiteDefault. If no setting is
|
|
40
|
+
specified, it will default to SiteDefault. See REST API Publish
|
|
41
|
+
Datasource for more information about ask_data_enablement.
|
|
42
|
+
|
|
43
|
+
connections : list[ConnectionItem]
|
|
44
|
+
The list of data connections (ConnectionItem) for the specified data
|
|
45
|
+
source. You must first call the populate_connections method to access
|
|
46
|
+
this data. See the ConnectionItem class.
|
|
47
|
+
|
|
48
|
+
content_url : Optional[str]
|
|
49
|
+
The name of the data source as it would appear in a URL.
|
|
50
|
+
|
|
51
|
+
created_at : Optional[datetime.datetime]
|
|
52
|
+
The time the data source was created.
|
|
53
|
+
|
|
54
|
+
certified : Optional[bool]
|
|
55
|
+
A Boolean value that indicates whether the data source is certified.
|
|
56
|
+
|
|
57
|
+
certification_note : Optional[str]
|
|
58
|
+
The optional note that describes the certified data source.
|
|
59
|
+
|
|
60
|
+
datasource_type : Optional[str]
|
|
61
|
+
The type of data source, for example, sqlserver or excel-direct.
|
|
62
|
+
|
|
63
|
+
description : Optional[str]
|
|
64
|
+
The description for the data source.
|
|
65
|
+
|
|
66
|
+
encrypt_extracts : Optional[bool]
|
|
67
|
+
A Boolean value to determine if a datasource should be encrypted or not.
|
|
68
|
+
See Extract and Encryption Methods for more information.
|
|
69
|
+
|
|
70
|
+
has_extracts : Optional[bool]
|
|
71
|
+
A Boolean value that indicates whether the datasource has extracts.
|
|
72
|
+
|
|
73
|
+
id : Optional[str]
|
|
74
|
+
The identifier for the data source. You need this value to query a
|
|
75
|
+
specific data source or to delete a data source with the get_by_id and
|
|
76
|
+
delete methods.
|
|
77
|
+
|
|
78
|
+
name : Optional[str]
|
|
79
|
+
The name of the data source. If not specified, the name of the published
|
|
80
|
+
data source file is used.
|
|
81
|
+
|
|
82
|
+
owner_id : Optional[str]
|
|
83
|
+
The identifier of the owner of the data source.
|
|
84
|
+
|
|
85
|
+
project_id : Optional[str]
|
|
86
|
+
The identifier of the project associated with the data source. You must
|
|
87
|
+
provide this identifier when you create an instance of a DatasourceItem.
|
|
88
|
+
|
|
89
|
+
project_name : Optional[str]
|
|
90
|
+
The name of the project associated with the data source.
|
|
91
|
+
|
|
92
|
+
tags : Optional[set[str]]
|
|
93
|
+
The tags (list of strings) that have been added to the data source.
|
|
94
|
+
|
|
95
|
+
updated_at : Optional[datetime.datetime]
|
|
96
|
+
The date and time when the data source was last updated.
|
|
97
|
+
|
|
98
|
+
use_remote_query_agent : Optional[bool]
|
|
99
|
+
A Boolean value that indicates whether to allow or disallow your Tableau
|
|
100
|
+
Cloud site to use Tableau Bridge clients. Bridge allows you to maintain
|
|
101
|
+
data sources with live connections to supported on-premises data
|
|
102
|
+
sources. See Configure and Manage the Bridge Client Pool for more
|
|
103
|
+
information.
|
|
104
|
+
|
|
105
|
+
webpage_url : Optional[str]
|
|
106
|
+
The url of the datasource as displayed in browsers.
|
|
107
|
+
"""
|
|
108
|
+
|
|
22
109
|
class AskDataEnablement:
|
|
23
110
|
Enabled = "Enabled"
|
|
24
111
|
Disabled = "Disabled"
|
|
@@ -33,28 +120,28 @@ class DatasourceItem:
|
|
|
33
120
|
)
|
|
34
121
|
|
|
35
122
|
def __init__(self, project_id: Optional[str] = None, name: Optional[str] = None) -> None:
|
|
36
|
-
self._ask_data_enablement = None
|
|
37
|
-
self._certified = None
|
|
38
|
-
self._certification_note = None
|
|
39
|
-
self._connections = None
|
|
123
|
+
self._ask_data_enablement: Optional[str] = None
|
|
124
|
+
self._certified: Optional[bool] = None
|
|
125
|
+
self._certification_note: Optional[str] = None
|
|
126
|
+
self._connections: Optional[list[ConnectionItem]] = None
|
|
40
127
|
self._content_url: Optional[str] = None
|
|
41
|
-
self._created_at = None
|
|
42
|
-
self._datasource_type = None
|
|
43
|
-
self._description = None
|
|
44
|
-
self._encrypt_extracts = None
|
|
45
|
-
self._has_extracts = None
|
|
128
|
+
self._created_at: Optional[datetime.datetime] = None
|
|
129
|
+
self._datasource_type: Optional[str] = None
|
|
130
|
+
self._description: Optional[str] = None
|
|
131
|
+
self._encrypt_extracts: Optional[bool] = None
|
|
132
|
+
self._has_extracts: Optional[bool] = None
|
|
46
133
|
self._id: Optional[str] = None
|
|
47
134
|
self._initial_tags: set = set()
|
|
48
135
|
self._project_name: Optional[str] = None
|
|
49
136
|
self._revisions = None
|
|
50
137
|
self._size: Optional[int] = None
|
|
51
|
-
self._updated_at = None
|
|
52
|
-
self._use_remote_query_agent = None
|
|
53
|
-
self._webpage_url = None
|
|
54
|
-
self.description = None
|
|
55
|
-
self.name = name
|
|
138
|
+
self._updated_at: Optional[datetime.datetime] = None
|
|
139
|
+
self._use_remote_query_agent: Optional[bool] = None
|
|
140
|
+
self._webpage_url: Optional[str] = None
|
|
141
|
+
self.description: Optional[str] = None
|
|
142
|
+
self.name: Optional[str] = name
|
|
56
143
|
self.owner_id: Optional[str] = None
|
|
57
|
-
self.project_id = project_id
|
|
144
|
+
self.project_id: Optional[str] = project_id
|
|
58
145
|
self.tags: set[str] = set()
|
|
59
146
|
|
|
60
147
|
self._permissions = None
|
|
@@ -63,16 +150,16 @@ class DatasourceItem:
|
|
|
63
150
|
return None
|
|
64
151
|
|
|
65
152
|
@property
|
|
66
|
-
def ask_data_enablement(self) -> Optional[
|
|
153
|
+
def ask_data_enablement(self) -> Optional[str]:
|
|
67
154
|
return self._ask_data_enablement
|
|
68
155
|
|
|
69
156
|
@ask_data_enablement.setter
|
|
70
157
|
@property_is_enum(AskDataEnablement)
|
|
71
|
-
def ask_data_enablement(self, value: Optional[
|
|
158
|
+
def ask_data_enablement(self, value: Optional[str]):
|
|
72
159
|
self._ask_data_enablement = value
|
|
73
160
|
|
|
74
161
|
@property
|
|
75
|
-
def connections(self)
|
|
162
|
+
def connections(self):
|
|
76
163
|
if self._connections is None:
|
|
77
164
|
error = "Datasource item must be populated with connections first."
|
|
78
165
|
raise UnpopulatedPropertyError(error)
|
|
@@ -112,7 +199,7 @@ class DatasourceItem:
|
|
|
112
199
|
self._certification_note = value
|
|
113
200
|
|
|
114
201
|
@property
|
|
115
|
-
def encrypt_extracts(self):
|
|
202
|
+
def encrypt_extracts(self) -> Optional[bool]:
|
|
116
203
|
return self._encrypt_extracts
|
|
117
204
|
|
|
118
205
|
@encrypt_extracts.setter
|
|
@@ -156,7 +243,7 @@ class DatasourceItem:
|
|
|
156
243
|
return self._description
|
|
157
244
|
|
|
158
245
|
@description.setter
|
|
159
|
-
def description(self, value: str):
|
|
246
|
+
def description(self, value: Optional[str]):
|
|
160
247
|
self._description = value
|
|
161
248
|
|
|
162
249
|
@property
|
|
@@ -187,7 +274,7 @@ class DatasourceItem:
|
|
|
187
274
|
def size(self) -> Optional[int]:
|
|
188
275
|
return self._size
|
|
189
276
|
|
|
190
|
-
def _set_connections(self, connections):
|
|
277
|
+
def _set_connections(self, connections) -> None:
|
|
191
278
|
self._connections = connections
|
|
192
279
|
|
|
193
280
|
def _set_permissions(self, permissions):
|
|
@@ -5,6 +5,7 @@ from tableauserverclient.server.request_options import (
|
|
|
5
5
|
ExcelRequestOptions,
|
|
6
6
|
ImageRequestOptions,
|
|
7
7
|
PDFRequestOptions,
|
|
8
|
+
PPTXRequestOptions,
|
|
8
9
|
RequestOptions,
|
|
9
10
|
)
|
|
10
11
|
from tableauserverclient.server.filter import Filter
|
|
@@ -52,6 +53,7 @@ __all__ = [
|
|
|
52
53
|
"ExcelRequestOptions",
|
|
53
54
|
"ImageRequestOptions",
|
|
54
55
|
"PDFRequestOptions",
|
|
56
|
+
"PPTXRequestOptions",
|
|
55
57
|
"RequestOptions",
|
|
56
58
|
"Filter",
|
|
57
59
|
"Sort",
|