1
1
import copy
2
2
import datetime
3
3
import xml .etree .ElementTree as ET
4
- from typing import Optional
4
+ from typing import Iterable , Optional
5
5
6
6
from defusedxml .ElementTree import fromstring
7
7
15
15
16
16
17
17
class FlowItem :
18
+ """
19
+ Represents a Tableau Flow item.
20
+
21
+ Parameters
22
+ ----------
23
+ project_id: str
24
+ The ID of the project that the flow belongs to.
25
+
26
+ name: Optional[str]
27
+ The name of the flow.
28
+
29
+ Attributes
30
+ ----------
31
+ connections: Iterable[ConnectionItem]
32
+ The connections associated with the flow. This property is not populated
33
+ by default and must be populated by calling the `populate_connections`
34
+ method.
35
+
36
+ created_at: Optional[datetime.datetime]
37
+ The date and time when the flow was created.
38
+
39
+ description: Optional[str]
40
+ The description of the flow.
41
+
42
+ dqws: Iterable[DQWItem]
43
+ The data quality warnings associated with the flow. This property is not
44
+ populated by default and must be populated by calling the `populate_dqws`
45
+ method.
46
+
47
+ id: Optional[str]
48
+ The ID of the flow.
49
+
50
+ name: Optional[str]
51
+ The name of the flow.
52
+
53
+ owner_id: Optional[str]
54
+ The ID of the user who owns the flow.
55
+
56
+ project_name: Optional[str]
57
+ The name of the project that the flow belongs to.
58
+
59
+ tags: set[str]
60
+ The tags associated with the flow.
61
+ """
62
+
18
63
def __repr__ (self ):
19
64
return "<Flow {} '{}' ({}) Project={} createdAt={}" .format (
20
65
self ._id , self .name , self .description , self .project_id , self .created_at
@@ -33,9 +78,9 @@ def __init__(self, project_id: str, name: Optional[str] = None) -> None:
33
78
self .tags : set [str ] = set ()
34
79
self .description : Optional [str ] = None
35
80
36
- self ._connections : Optional [ConnectionItem ] = None
37
- self ._permissions : Optional [Permission ] = None
38
- self ._data_quality_warnings : Optional [DQWItem ] = None
81
+ self ._connections : Optional [Iterable [ ConnectionItem ] ] = None
82
+ self ._permissions : Optional [Iterable [ Permission ] ] = None
83
+ self ._data_quality_warnings : Optional [Iterable [ DQWItem ] ] = None
39
84
40
85
@property
41
86
def connections (self ):
0 commit comments