Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
ffcb786
Adding name property to jobItem Class
Jun 5, 2024
f7fd213
Adding test for workbook name
Jun 6, 2024
9daf4e3
Adding datasource name attribute to job item
Jun 7, 2024
4f542b5
Merge branch 'master' into master
jacalata Jun 21, 2024
ea53460
chore: make auth endpoint imports absolute
jorwoods Jun 28, 2024
3a3f156
feat: enable bulk add and remove users
jorwoods Jun 29, 2024
8f0609d
feat: parse linked task xml
jorwoods Jul 24, 2024
92c8320
feat: get linked tasks
jorwoods Jul 24, 2024
6056255
style: black
jorwoods Jul 24, 2024
643d765
chore: switch to pytest style asserts
jorwoods Jul 24, 2024
ddd1a71
feat: linked task get_by_id
jorwoods Jul 24, 2024
f8843d4
feat: run linked task now
jorwoods Jul 24, 2024
062a55f
chore: make imports for flows absolute
jorwoods Jun 28, 2024
1745bf6
feat: add support for groupsets
jorwoods Jun 26, 2024
6351d36
feat: add tag name to GroupSet
jorwoods Jun 28, 2024
91cdd5f
Update Contributors list
bcantoni Jul 28, 2024
3a27d2b
Update contributing file to point to the newer Developer Guide instead
bcantoni Jul 28, 2024
4e57886
Add contributor pointers to readme
bcantoni Jul 28, 2024
55a74e3
Merge pull request #1428 from tableau/bcantoni/2024-update-contributors
jacalata Jul 29, 2024
6885a8a
Merge pull request #1391 from ivanB1975/master
jacalata Jul 29, 2024
b6c4372
Add __str__ and __repr__ to DatabaseItem
joelclark Jul 31, 2024
29c08e7
Merge branch 'development' into add_repr_to_database_item
jacalata Aug 2, 2024
d1c61a1
Merge pull request #1410 from jorwoods/jorwoods/auth_endpoint_imports
jacalata Aug 2, 2024
802f302
Merge pull request #1411 from jorwoods/jorwoods/flow_absolute_imports
jacalata Aug 2, 2024
2975d2f
Merge pull request #1413 from jorwoods/jorwoods/group_bulk_edit
jacalata Aug 2, 2024
e980142
Merge pull request #1432 from joelclark/add_repr_to_database_item
jacalata Aug 2, 2024
3a53d00
Merge pull request #1405 from jorwoods/jorwoods/groupsets
jacalata Aug 2, 2024
ac43f1a
feat: add/remove tags endpoints for workbooks
jorwoods Jul 22, 2024
35672c3
refactor: use mixin class for tagging endpoints
jorwoods Aug 2, 2024
8fb8189
style: mypy and black
jorwoods Aug 2, 2024
8f1ff4c
feat: add tagging support to views
jorwoods Aug 2, 2024
ee771d8
style: black
jorwoods Aug 2, 2024
a625382
feat: add tagging to datasource endpoint
jorwoods Aug 2, 2024
3209f3a
test: add/delete tags with just object id
jorwoods Aug 2, 2024
1b45816
feat: tag tables
jorwoods Aug 2, 2024
5dae8bb
feat: tag databases
jorwoods Aug 2, 2024
56301e9
chore: unused imports
jorwoods Aug 2, 2024
b7e6d13
fix: clean up delete_tags test comparison
jorwoods Aug 2, 2024
9f6e151
feat: batch tag create and delete
jorwoods Aug 3, 2024
88b124f
chore: cleanup typing for TaggingMixin
jorwoods Aug 3, 2024
f99ef0e
fix: id in Taggable protocol
jorwoods Aug 3, 2024
8875c8b
chore: replace resource_tagger with mixin call
jorwoods Aug 3, 2024
da4eb90
chore: switch to using mixin methods
jorwoods Aug 3, 2024
1a9a5ab
refactor: tag test parameter extraction
jorwoods Aug 3, 2024
28503b5
feat: add tagging to flows
jorwoods Aug 3, 2024
cf7bce7
chore: use overrides to apply decorator
jorwoods Aug 3, 2024
c84f921
feat: download custom views
jorwoods Aug 4, 2024
da501d6
feat: publish custom views
jorwoods Aug 4, 2024
17bd73a
fix: add missing test asset
jorwoods Aug 4, 2024
fc849b0
docs: add docstrings detailing the filter options
jorwoods Aug 6, 2024
3a47c28
style: black
jorwoods Aug 6, 2024
78291d6
feat: get page and chunk size from env vars
jorwoods Aug 17, 2024
f2710cd
style: black
jorwoods Aug 17, 2024
afc293e
test: chunk size env var
jorwoods Aug 17, 2024
816ba80
Merge branch 'development' into jorwoods/linked_tasks
jacalata Aug 21, 2024
8d8adbd
Merge pull request #1434 from jorwoods/jorwoods/custom_views_dl_pub
jacalata Aug 21, 2024
a3028d7
Merge pull request #1435 from jorwoods/jorwoods/filter_docstrings
jacalata Aug 22, 2024
5d6e25c
Merge branch 'development' into jorwoods/wb_tags
jacalata Aug 22, 2024
d4a2ab6
style: black
jorwoods Aug 23, 2024
a3c9afa
chore(typing): flow endpoint tags
jorwoods Aug 23, 2024
273beb1
Revert "chore(typing): flow endpoint tags"
jorwoods Aug 23, 2024
9e23d31
Merge pull request #1422 from jorwoods/jorwoods/wb_tags
jacalata Aug 23, 2024
ced5fe3
Merge pull request #1439 from jorwoods/jorwoods/env_var_config
jacalata Aug 23, 2024
8b728a5
Merge pull request #1424 from jorwoods/jorwoods/linked_tasks
jacalata Aug 23, 2024
ffa0601
chore(typing): endpoint decorators
jorwoods Aug 23, 2024
8d6b3f2
chore(typing): request factory ts_wrapped
jorwoods Aug 23, 2024
9f7bfaa
chore: fix typing on TaggingMixin
jorwoods Aug 24, 2024
01b171e
test: update_tags
jorwoods Aug 24, 2024
99d330f
fix: ParamSpec introduced in 3.10
jorwoods Aug 24, 2024
cc4e47a
test: update_tags item doesn't have tags attributes
jorwoods Aug 24, 2024
51112f1
fix: str/repr for BackgroundJobItem
jorwoods Jul 12, 2024
391fc40
chore: jobs_endpoint absolute imports
jorwoods Jul 12, 2024
3c3c5b3
chore: absolute imports for jobitem
jorwoods Jul 12, 2024
7dc5ad4
fix: Pager typing
jorwoods Aug 27, 2024
a7b5e2c
fix: python3.8 syntax
jorwoods Aug 27, 2024
678d46a
Merge pull request #1447 from jorwoods/jorwoods/typing_decorators
jacalata Sep 2, 2024
bb4ba5a
Merge branch 'development' into jorwoods/fix_pager_typing
jacalata Sep 2, 2024
4cf1916
Merge pull request #1449 from jorwoods/jorwoods/fix_pager_typing
jacalata Sep 2, 2024
6053bdc
Merge pull request #1448 from jorwoods/jorwoods/jobitem_repr
jacalata Sep 2, 2024
fad98bd
feat: virtual connections
jacalata Sep 2, 2024
60e6b9c
feat: add as_reference method to groupset
jorwoods Sep 6, 2024
28c2487
Add support for all types of monthly repeating schedules (#1462)
bcantoni Sep 17, 2024
4584717
README update to kick CLA bot
jacalata Sep 17, 2024
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
126 changes: 73 additions & 53 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,79 @@ The following people have contributed to this project to make it possible, and w

## Contributors

* [jacalata](https://github.com/jacalata)
* [jorwoods](https://github.com/jorwoods)
* [t8y8](https://github.com/t8y8)
* [bcantoni](https://github.com/bcantoni)
* [shinchris](https://github.com/shinchris)
* [vogelsgesang](https://github.com/vogelsgesang)
* [lbrendanl](https://github.com/lbrendanl)
* [LGraber](https://github.com/LGraber)
* [gaoang2148](https://github.com/gaoang2148)
* [benlower](https://github.com/benlower)
* [liu-rebecca](https://github.com/liu-rebecca)
* [guodah](https://github.com/guodah)
* [jdomingu](https://github.com/jdomingu)
* [kykrueger](https://github.com/kykrueger)
* [jz-huang](https://github.com/jz-huang)
* [opus-42](https://github.com/opus-42)
* [markm-io](https://github.com/markm-io)
* [graysonarts](https://github.com/graysonarts)
* [d45](https://github.com/d45)
* [preguraman](https://github.com/preguraman)
* [sotnich](https://github.com/sotnich)
* [mmuttreja-tableau](https://github.com/mmuttreja-tableau)
* [dependabot[bot]](https://github.com/apps/dependabot)
* [scuml](https://github.com/scuml)
* [ovinis](https://github.com/ovinis)
* [FFMMM](https://github.com/FFMMM)
* [martinbpeters](https://github.com/martinbpeters)
* [talvalin](https://github.com/talvalin)
* [dzucker-tab](https://github.com/dzucker-tab)
* [a-torres-2](https://github.com/a-torres-2)
* [nnevalainen](https://github.com/nnevalainen)
* [mbren](https://github.com/mbren)
* [wolkiewiczk](https://github.com/wolkiewiczk)
* [jacobj10](https://github.com/jacobj10)
* [hugoboos](https://github.com/hugoboos)
* [grbritz](https://github.com/grbritz)
* [fpagliar](https://github.com/fpagliar)
* [bskim45](https://github.com/bskim45)
* [baixin137](https://github.com/baixin137)
* [jessicachen79](https://github.com/jessicachen79)
* [gconklin](https://github.com/gconklin)
* [geordielad](https://github.com/geordielad)
* [Hugo Stijns](https://github.com/hugoboos)
* [kovner](https://github.com/kovner)
* [Talvalin](https://github.com/Talvalin)
* [Chris Toomey](https://github.com/cmtoomey)
* [Vathsala Achar](https://github.com/VathsalaAchar)
* [Graeme Britz](https://github.com/grbritz)
* [Russ Goldin](https://github.com/tagyoureit)
* [William Lang](https://github.com/williamlang)
* [Jim Morris](https://github.com/jimbodriven)
* [BingoDinkus](https://github.com/BingoDinkus)
* [Sergey Sotnichenko](https://github.com/sotnich)
* [Bruce Zhang](https://github.com/baixin137)
* [Bumsoo Kim](https://github.com/bskim45)
* [fossabot](https://github.com/fossabot)
* [daniel1608](https://github.com/daniel1608)
* [Joshua Jacob](https://github.com/jacobj10)
* [Francisco Pagliaricci](https://github.com/fpagliar)
* [Tomasz Machalski](https://github.com/toomyem)
* [Jared Dominguez](https://github.com/jdomingu)
* [Brendan Lee](https://github.com/lbrendanl)
* [Martin Dertz](https://github.com/martydertz)
* [Christian Oliff](https://github.com/coliff)
* [Albin Antony](https://github.com/user9747)
* [prae04](https://github.com/prae04)
* [Martin Peters](https://github.com/martinbpeters)
* [Sherman K](https://github.com/shrmnk)
* [Jorge Fonseca](https://github.com/JorgeFonseca)
* [Kacper Wolkiewicz](https://github.com/wolkiewiczk)
* [Dahai Guo](https://github.com/guodah)
* [Geraldine Zanolli](https://github.com/illonage)
* [Jordan Woods](https://github.com/jorwoods)
* [Reba Magier](https://github.com/rmagier1)
* [Stephen Mitchell](https://github.com/scuml)
* [absentmoose](https://github.com/absentmoose)
* [Paul Vickers](https://github.com/paulvic)
* [Madhura Selvarajan](https://github.com/maddy-at-leisure)
* [Niklas Nevalainen](https://github.com/nnevalainen)
* [Terrence Jones](https://github.com/tjones-commits)
* [John Vandenberg](https://github.com/jayvdb)
* [Lee Boynton](https://github.com/lboynton)
* [annematronic](https://github.com/annematronic)

## Core Team

* [Chris Shin](https://github.com/shinchris)
* [Lee Graber](https://github.com/lgraber)
* [Tyler Doyle](https://github.com/t8y8)
* [Russell Hay](https://github.com/RussTheAerialist)
* [Ben Lower](https://github.com/benlower)
* [Ang Gao](https://github.com/gaoang2148)
* [Priya Reguraman](https://github.com/preguraman)
* [Jac Fitzgerald](https://github.com/jacalata)
* [Dan Zucker](https://github.com/dzucker-tab)
* [Brian Cantoni](https://github.com/bcantoni)
* [Ovini Nanayakkara](https://github.com/ovinis)
* [Manish Muttreja](https://github.com/mmuttreja-tableau)
* [rshide](https://github.com/rshide)
* [VathsalaAchar](https://github.com/VathsalaAchar)
* [TrimPeachu](https://github.com/TrimPeachu)
* [ajbosco](https://github.com/ajbosco)
* [jimbodriven](https://github.com/jimbodriven)
* [ltiffanydev](https://github.com/ltiffanydev)
* [martydertz](https://github.com/martydertz)
* [r-richmond](https://github.com/r-richmond)
* [sfarr15](https://github.com/sfarr15)
* [tagyoureit](https://github.com/tagyoureit)
* [tjones-commits](https://github.com/tjones-commits)
* [yoshichan5](https://github.com/yoshichan5)
* [wlodi83](https://github.com/wlodi83)
* [anipmehta](https://github.com/anipmehta)
* [cmtoomey](https://github.com/cmtoomey)
* [pes-magic](https://github.com/pes-magic)
* [illonage](https://github.com/illonage)
* [jayvdb](https://github.com/jayvdb)
* [jorgeFons](https://github.com/jorgeFons)
* [Kovner](https://github.com/Kovner)
* [LarsBreddemann](https://github.com/LarsBreddemann)
* [lboynton](https://github.com/lboynton)
* [maddy-at-leisure](https://github.com/maddy-at-leisure)
* [narcolino-tableau](https://github.com/narcolino-tableau)
* [PatrickfBraz](https://github.com/PatrickfBraz)
* [paulvic](https://github.com/paulvic)
* [shrmnk](https://github.com/shrmnk)
* [TableauKyle](https://github.com/TableauKyle)
* [bossenti](https://github.com/bossenti)
* [ma7tcsp](https://github.com/ma7tcsp)
* [toomyem](https://github.com/toomyem)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Use the Tableau Server Client (TSC) library to increase your productivity as you
* Create users and groups.
* Query projects, sites, and more.

This repository contains Python source code for the library and sample files showing how to use it. As of May 2022, Python versions 3.7 and up are supported.
This repository contains Python source code for the library and sample files showing how to use it. As of September 2024, support for Python 3.7 and 3.8 will be dropped - support for older versions of Python aims to match https://devguide.python.org/versions/

To see sample code that works directly with the REST API (in Java, Python, or Postman), visit the [REST API Samples](https://github.com/tableau/rest-api-samples) repo.

For more information on installing and using TSC, see the documentation:
<https://tableau.github.io/server-client-python/docs/>


To contribute, see our [Developer Guide](https://tableau.github.io/server-client-python/docs/dev-guide). A list of all our contributors to date is in [CONTRIBUTORS.md].

## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Ftableau%2Fserver-client-python.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Ftableau%2Fserver-client-python?ref=badge_large)
65 changes: 2 additions & 63 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Contribution can include, but are not limited to, any of the following:
* Fix an Issue/Bug
* Add/Fix documentation

Contributions must follow the guidelines outlined on the [Tableau Organization](http://tableau.github.io/) page, though filing an issue or requesting a feature do not require the CLA.

## Issues and Feature Requests

To submit an issue/bug report, or to request a feature, please submit a [GitHub issue](https://github.com/tableau/server-client-python/issues) to the repo.
Expand All @@ -22,65 +20,6 @@ files to assist in the repro. **Be sure to scrub the files of any potentially s
For a feature request, please try to describe the scenario you are trying to accomplish that requires the feature. This will help us understand
the limitations that you are running into, and provide us with a use case to know if we've satisfied your request.

### Label usage on Issues

The core team is responsible for assigning most labels to the issue. Labels
are used for prioritizing the core team's work, and use the following
definitions for labels.

The following labels are only to be set or changed by the core team:

* **bug** - A bug is an unintended behavior for existing functionality. It only relates to existing functionality and the behavior that is expected with that functionality. We do not use **bug** to indicate priority.
* **enhancement** - An enhancement is a new piece of functionality and is related to the fact that new code will need to be written in order to close this issue. We do not use **enhancement** to indicate priority.
* **CLARequired** - This label is used to indicate that the contribution will require that the CLA is signed before we can accept a PR. This label should not be used on Issues
* **CLANotRequired** - This label is used to indicate that the contribution does not require a CLA to be signed. This is used for minor fixes and usually around doc fixes or correcting strings.
* **help wanted** - This label on an issue indicates it's a good choice for external contributors to take on. It usually means it's an issue that can be tackled by first time contributors.

The following labels can be used by the issue creator or anyone in the
community to help us prioritize enhancement and bug fixes that are
causing pain from our users. The short of it is, purple tags are ones that
anyone can add to an issue:

* **Critical** - This means that you won't be able to use the library until the issues have been resolved. If an issue is already labeled as critical, but you want to show your support for it, add a +1 comment to the issue. This helps us know what issues are really impacting our users.
* **Nice To Have** - This means that the issue doesn't block your usage of the library, but would make your life easier. Like with critical, if the issue is already tagged with this, but you want to show your support, add a +1 comment to the issue.

## Fixes, Implementations, and Documentation

For all other things, please submit a PR that includes the fix, documentation, or new code that you are trying to contribute. More information on
creating a PR can be found in the [Development Guide](https://tableau.github.io/server-client-python/docs/dev-guide).

If the feature is complex or has multiple solutions that could be equally appropriate approaches, it would be helpful to file an issue to discuss the
design trade-offs of each solution before implementing, to allow us to collectively arrive at the best solution, which most likely exists in the middle
somewhere.

## Getting Started

```shell
python -m build
pytest
```

### To use your locally built version
```shell
pip install .
```

### Debugging Tools
See what your outgoing requests look like: https://requestbin.net/ (unaffiliated link not under our control)


### Before Committing

Our CI runs include a Python lint run, so you should run this locally and fix complaints before committing as this will fail your checkin.

```shell
# this will run the formatter without making changes
black . --check

# this will format the directory and code for you
black .
### Making Contributions

# this will run type checking
pip install mypy
mypy tableauserverclient test samples
```
Refer to the [Developer Guide](https://tableau.github.io/server-client-python/docs/dev-guide) which explains how to make contributions to the TSC project.
9 changes: 9 additions & 0 deletions getcontributors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import json
import requests


logins = json.loads(
requests.get("https://api.github.com/repos/tableau/server-client-python/contributors?per_page=200").text
)
for login in logins:
print(f"* [{login["login"]}]({login["html_url"]})")
10 changes: 10 additions & 0 deletions tableauserverclient/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
FlowRunItem,
FileuploadItem,
GroupItem,
GroupSetItem,
HourlyInterval,
IntervalItem,
JobItem,
JWTAuth,
LinkedTaskItem,
LinkedTaskStepItem,
LinkedTaskFlowRunItem,
MetricItem,
MonthlyInterval,
PaginationItem,
Expand All @@ -39,6 +43,7 @@
TaskItem,
UserItem,
ViewItem,
VirtualConnectionItem,
WebhookItem,
WeeklyInterval,
WorkbookItem,
Expand Down Expand Up @@ -79,6 +84,7 @@
"FlowRunItem",
"FileuploadItem",
"GroupItem",
"GroupSetItem",
"HourlyInterval",
"IntervalItem",
"JobItem",
Expand Down Expand Up @@ -116,4 +122,8 @@
"Pager",
"Server",
"Sort",
"LinkedTaskItem",
"LinkedTaskStepItem",
"LinkedTaskFlowRunItem",
"VirtualConnectionItem",
]
20 changes: 16 additions & 4 deletions tableauserverclient/config.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# TODO: check for env variables, else set default values
import os

ALLOWED_FILE_EXTENSIONS = ["tds", "tdsx", "tde", "hyper", "parquet"]

BYTES_PER_MB = 1024 * 1024

# For when a datasource is over 64MB, break it into 5MB(standard chunk size) chunks
CHUNK_SIZE_MB = 5 * 10 # 5MB felt too slow, upped it to 50

DELAY_SLEEP_SECONDS = 0.1

# The maximum size of a file that can be published in a single request is 64MB
FILESIZE_LIMIT_MB = 64


class Config:
# For when a datasource is over 64MB, break it into 5MB(standard chunk size) chunks
@property
def CHUNK_SIZE_MB(self):
return int(os.getenv("TSC_CHUNK_SIZE_MB", 5 * 10)) # 5MB felt too slow, upped it to 50

# Default page size
@property
def PAGE_SIZE(self):
return int(os.getenv("TSC_PAGE_SIZE", 100))


config = Config()
12 changes: 12 additions & 0 deletions tableauserverclient/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from tableauserverclient.models.flow_item import FlowItem
from tableauserverclient.models.flow_run_item import FlowRunItem
from tableauserverclient.models.group_item import GroupItem
from tableauserverclient.models.groupset_item import GroupSetItem
from tableauserverclient.models.interval_item import (
IntervalItem,
DailyInterval,
Expand All @@ -22,6 +23,11 @@
HourlyInterval,
)
from tableauserverclient.models.job_item import JobItem, BackgroundJobItem
from tableauserverclient.models.linked_tasks_item import (
LinkedTaskItem,
LinkedTaskStepItem,
LinkedTaskFlowRunItem,
)
from tableauserverclient.models.metric_item import MetricItem
from tableauserverclient.models.pagination_item import PaginationItem
from tableauserverclient.models.permissions_item import PermissionsRule, Permission
Expand All @@ -39,6 +45,7 @@
from tableauserverclient.models.task_item import TaskItem
from tableauserverclient.models.user_item import UserItem
from tableauserverclient.models.view_item import ViewItem
from tableauserverclient.models.virtual_connection_item import VirtualConnectionItem
from tableauserverclient.models.webhook_item import WebhookItem
from tableauserverclient.models.workbook_item import WorkbookItem

Expand All @@ -60,6 +67,7 @@
"FlowItem",
"FlowRunItem",
"GroupItem",
"GroupSetItem",
"IntervalItem",
"JobItem",
"DailyInterval",
Expand Down Expand Up @@ -89,6 +97,10 @@
"TaskItem",
"UserItem",
"ViewItem",
"VirtualConnectionItem",
"WebhookItem",
"WorkbookItem",
"LinkedTaskItem",
"LinkedTaskStepItem",
"LinkedTaskFlowRunItem",
]
6 changes: 4 additions & 2 deletions tableauserverclient/models/connection_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ def from_response(cls, resp, ns) -> List["ConnectionItem"]:
for connection_xml in all_connection_xml:
connection_item = cls()
connection_item._id = connection_xml.get("id", None)
connection_item._connection_type = connection_xml.get("type", None)
connection_item._connection_type = connection_xml.get("type", connection_xml.get("dbClass", None))
connection_item.embed_password = string_to_bool(connection_xml.get("embedPassword", ""))
connection_item.server_address = connection_xml.get("serverAddress", None)
connection_item.server_port = connection_xml.get("serverPort", None)
connection_item.username = connection_xml.get("userName", None)
connection_item._query_tagging = string_to_bool(connection_xml.get("queryTaggingEnabled", None))
connection_item._query_tagging = (
string_to_bool(s) if (s := connection_xml.get("queryTagging", None)) else None
)
datasource_elem = connection_xml.find(".//t:datasource", namespaces=ns)
if datasource_elem is not None:
connection_item._datasource_id = datasource_elem.get("id", None)
Expand Down
6 changes: 6 additions & 0 deletions tableauserverclient/models/database_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def __init__(self, name, description=None, content_permissions=None):

self._tables = None # Not implemented yet

def __str__(self):
return "<Database {0} '{1}'>".format(self._id, self.name)

def __repr__(self):
return self.__str__() + " { " + ", ".join(" % s: % s" % item for item in vars(self).items()) + "}"

@property
def dqws(self):
if self._data_quality_warnings is None:
Expand Down
Loading