Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: flow docstrings #1532

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 49 additions & 4 deletions tableauserverclient/models/flow_item.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
import datetime
import xml.etree.ElementTree as ET
from typing import Optional
from typing import Iterable, Optional

from defusedxml.ElementTree import fromstring

Expand All @@ -15,6 +15,51 @@


class FlowItem:
"""
Represents a Tableau Flow item.

Parameters
----------
project_id: str
The ID of the project that the flow belongs to.

name: Optional[str]
The name of the flow.

Attributes
----------
connections: Iterable[ConnectionItem]
The connections associated with the flow. This property is not populated
by default and must be populated by calling the `populate_connections`
method.

created_at: Optional[datetime.datetime]
The date and time when the flow was created.

description: Optional[str]
The description of the flow.

dqws: Iterable[DQWItem]
The data quality warnings associated with the flow. This property is not
populated by default and must be populated by calling the `populate_dqws`
method.

id: Optional[str]
The ID of the flow.

name: Optional[str]
The name of the flow.

owner_id: Optional[str]
The ID of the user who owns the flow.

project_name: Optional[str]
The name of the project that the flow belongs to.

tags: set[str]
The tags associated with the flow.
"""

def __repr__(self):
return "<Flow {} '{}' ({}) Project={} createdAt={}".format(
self._id, self.name, self.description, self.project_id, self.created_at
Expand All @@ -33,9 +78,9 @@ def __init__(self, project_id: str, name: Optional[str] = None) -> None:
self.tags: set[str] = set()
self.description: Optional[str] = None

self._connections: Optional[ConnectionItem] = None
self._permissions: Optional[Permission] = None
self._data_quality_warnings: Optional[DQWItem] = None
self._connections: Optional[Iterable[ConnectionItem]] = None
self._permissions: Optional[Iterable[Permission]] = None
self._data_quality_warnings: Optional[Iterable[DQWItem]] = None

@property
def connections(self):
Expand Down
Loading
Loading