Skip to content

Commit 1020485

Browse files
authored
docs: docstrings on ConnectionItem and ConnectionCredentials (#1526)
Co-authored-by: Jordan Woods <[email protected]>
1 parent a43355a commit 1020485

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

tableauserverclient/models/connection_credentials.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,27 @@
22

33

44
class ConnectionCredentials:
5-
"""Connection Credentials for Workbooks and Datasources publish request.
5+
"""
6+
Connection Credentials for Workbooks and Datasources publish request.
67
78
Consider removing this object and other variables holding secrets
89
as soon as possible after use to avoid them hanging around in memory.
910
11+
Parameters
12+
----------
13+
name: str
14+
The username for the connection.
15+
16+
password: str
17+
The password used for the connection.
18+
19+
embed: bool, default True
20+
Determines whether to embed the password (True) for the workbook or data source connection or not (False).
21+
22+
oauth: bool, default False
23+
Determines whether to use OAuth for the connection (True) or not (False).
24+
For more information see: https://help.tableau.com/current/server/en-us/protected_auth.htm
25+
1026
"""
1127

1228
def __init__(self, name, password, embed=True, oauth=False):

tableauserverclient/models/connection_item.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,44 @@
99

1010

1111
class ConnectionItem:
12+
"""
13+
Corresponds to workbook and data source connections.
14+
15+
Attributes
16+
----------
17+
datasource_id: str
18+
The identifier of the data source.
19+
20+
datasource_name: str
21+
The name of the data source.
22+
23+
id: str
24+
The identifier of the connection.
25+
26+
connection_type: str
27+
The type of connection.
28+
29+
username: str
30+
The username for the connection. (see ConnectionCredentials)
31+
32+
password: str
33+
The password used for the connection. (see ConnectionCredentials)
34+
35+
embed_password: bool
36+
Determines whether to embed the password (True) for the workbook or data source connection or not (False). (see ConnectionCredentials)
37+
38+
server_address: str
39+
The server address for the connection.
40+
41+
server_port: str
42+
The port used for the connection.
43+
44+
connection_credentials: ConnectionCredentials
45+
The Connection Credentials object containing authentication details for
46+
the connection. Replaces username/password/embed_password when
47+
publishing a flow, document or workbook file in the request body.
48+
"""
49+
1250
def __init__(self):
1351
self._datasource_id: Optional[str] = None
1452
self._datasource_name: Optional[str] = None

0 commit comments

Comments
 (0)