Skip to content

Commit 31af29b

Browse files
committed
docs: Docstrings for new fields
1 parent f5afa19 commit 31af29b

File tree

7 files changed

+134
-1
lines changed

7 files changed

+134
-1
lines changed

tableauserverclient/models/datasource_item.py

+21
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class DatasourceItem:
4242
specified, it will default to SiteDefault. See REST API Publish
4343
Datasource for more information about ask_data_enablement.
4444
45+
connected_workbooks_count : Optional[int]
46+
The number of workbooks connected to the datasource.
47+
4548
connections : list[ConnectionItem]
4649
The list of data connections (ConnectionItem) for the specified data
4750
source. You must first call the populate_connections method to access
@@ -69,6 +72,12 @@ class DatasourceItem:
6972
A Boolean value to determine if a datasource should be encrypted or not.
7073
See Extract and Encryption Methods for more information.
7174
75+
favorites_total : Optional[int]
76+
The number of users who have marked the data source as a favorite.
77+
78+
has_alert : Optional[bool]
79+
A Boolean value that indicates whether the data source has an alert.
80+
7281
has_extracts : Optional[bool]
7382
A Boolean value that indicates whether the datasource has extracts.
7483
@@ -77,20 +86,32 @@ class DatasourceItem:
7786
specific data source or to delete a data source with the get_by_id and
7887
delete methods.
7988
89+
is_published : Optional[bool]
90+
A Boolean value that indicates whether the data source is published.
91+
8092
name : Optional[str]
8193
The name of the data source. If not specified, the name of the published
8294
data source file is used.
8395
96+
owner: Optional[UserItem]
97+
The owner of the data source.
98+
8499
owner_id : Optional[str]
85100
The identifier of the owner of the data source.
86101
102+
project : Optional[ProjectItem]
103+
The project that the data source belongs to.
104+
87105
project_id : Optional[str]
88106
The identifier of the project associated with the data source. You must
89107
provide this identifier when you create an instance of a DatasourceItem.
90108
91109
project_name : Optional[str]
92110
The name of the project associated with the data source.
93111
112+
server_name : Optional[str]
113+
The name of the server where the data source is published.
114+
94115
tags : Optional[set[str]]
95116
The tags (list of strings) that have been added to the data source.
96117

tableauserverclient/models/group_item.py

+5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ class GroupItem:
4444
login to a site. When the mode is onSync, a license is granted for group
4545
members each time the domain is synced.
4646
47+
Attributes
48+
----------
49+
user_count: Optional[int]
50+
The number of users in the group.
51+
4752
Examples
4853
--------
4954
>>> # Create a new group item

tableauserverclient/models/location_item.py

+14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33

44

55
class LocationItem:
6+
"""
7+
Details of where an item is located, such as a personal space or project.
8+
9+
Attributes
10+
----------
11+
id : str | None
12+
The ID of the location.
13+
14+
type : str | None
15+
The type of location, such as PersonalSpace or Project.
16+
17+
name : str | None
18+
The name of the location.
19+
"""
620
class Type:
721
PersonalSpace = "PersonalSpace"
822
Project = "Project"

tableauserverclient/models/project_item.py

+17
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,29 @@ class corresponds to the project resources you can access using the Tableau
3838
3939
Attributes
4040
----------
41+
datasource_count : int
42+
The number of data sources in the project.
43+
4144
id : str
4245
The unique identifier for the project.
4346
4447
owner_id : str
4548
The unique identifier for the UserItem owner of the project.
4649
50+
project_count : int
51+
The number of projects in the project.
52+
53+
top_level_project : bool
54+
True if the project is a top-level project.
55+
56+
view_count : int
57+
The number of views in the project.
58+
59+
workbok_count : int
60+
The number of workbooks in the project.
61+
62+
writeable : bool
63+
True if the project is writeable.
4764
"""
4865

4966
ERROR_MSG = "Project item must be populated with permissions first."

tableauserverclient/models/user_item.py

+43
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,49 @@ class UserItem:
3737
auth_setting: str
3838
Required attribute for Tableau Cloud. How the user autenticates to the
3939
server.
40+
41+
Attributes
42+
----------
43+
domain_name: Optional[str]
44+
The name of the Active Directory domain ("local" if local authentication
45+
is used).
46+
47+
email: Optional[str]
48+
The email address of the user.
49+
50+
external_auth_user_id: Optional[str]
51+
The unique identifier for the user in the external authentication system.
52+
53+
id: Optional[str]
54+
The unique identifier for the user.
55+
56+
favorites: dict[str, list]
57+
The favorites of the user. Must be populated with a call to
58+
`populate_favorites()`.
59+
60+
fullname: Optional[str]
61+
The full name of the user.
62+
63+
groups: Pager
64+
The groups the user belongs to. Must be populated with a call to
65+
`populate_groups()`.
66+
67+
last_login: Optional[datetime]
68+
The last time the user logged in.
69+
70+
locale: Optional[str]
71+
The locale of the user.
72+
73+
language: Optional[str]
74+
Language setting for the user.
75+
76+
idp_configuration_id: Optional[str]
77+
The ID of the identity provider configuration.
78+
79+
workbooks: Pager
80+
The workbooks owned by the user. Must be populated with a call to
81+
`populate_workbooks()`.
82+
4083
"""
4184

4285
tag_name: str = "user"

tableauserverclient/models/view_item.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,16 @@ class ViewItem:
4040
The image of the view. You must first call the `views.populate_image`
4141
method to access the image.
4242
43+
location: Optional[LocationItem], default None
44+
The location of the view. The location can be a personal space or a
45+
project.
46+
4347
name: Optional[str], default None
4448
The name of the view.
4549
50+
owner: Optional[UserItem], default None
51+
The owner of the view.
52+
4653
owner_id: Optional[str], default None
4754
The ID for the owner of the view.
4855
@@ -54,6 +61,9 @@ class ViewItem:
5461
The preview image of the view. You must first call the
5562
`views.populate_preview_image` method to access the preview image.
5663
64+
project: Optional[ProjectItem], default None
65+
The project that contains the view.
66+
5767
project_id: Optional[str], default None
5868
The ID for the project that contains the view.
5969
@@ -66,9 +76,11 @@ class ViewItem:
6676
updated_at: Optional[datetime], default None
6777
The date and time when the view was last updated.
6878
79+
workbook: Optional[WorkbookItem], default None
80+
The workbook that contains the view.
81+
6982
workbook_id: Optional[str], default None
7083
The ID for the workbook that contains the view.
71-
7284
"""
7385

7486
def __init__(self) -> None:

tableauserverclient/models/workbook_item.py

+21
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,41 @@ class as arguments. The workbook item specifies the project.
5454
created_at : Optional[datetime.datetime]
5555
The date and time the workbook was created.
5656
57+
default_view_id : Optional[str]
58+
The identifier for the default view of the workbook.
59+
5760
description : Optional[str]
5861
User-defined description of the workbook.
5962
63+
encrypt_extracts : Optional[bool]
64+
Indicates whether extracts are encrypted.
65+
66+
has_extracts : Optional[bool]
67+
Indicates whether the workbook has extracts.
68+
6069
id : Optional[str]
6170
The identifier for the workbook. You need this value to query a specific
6271
workbook or to delete a workbook with the get_by_id and delete methods.
6372
73+
last_published_at : Optional[datetime.datetime]
74+
The date and time the workbook was last published.
75+
76+
location : Optional[LocationItem]
77+
The location of the workbook, such as a personal space or project.
78+
79+
owner : Optional[UserItem]
80+
The owner of the workbook.
81+
6482
owner_id : Optional[str]
6583
The identifier for the owner (UserItem) of the workbook.
6684
6785
preview_image : bytes
6886
The thumbnail image for the view. You must first call the
6987
workbooks.populate_preview_image method to access this data.
7088
89+
project: Optional[ProjectItem]
90+
The project that contains the workbook.
91+
7192
project_name : Optional[str]
7293
The name of the project that contains the workbook.
7394

0 commit comments

Comments
 (0)