Skip to content

Commit ee00b07

Browse files
committed
chore: remove examples
1 parent a249422 commit ee00b07

File tree

3 files changed

+0
-85
lines changed

3 files changed

+0
-85
lines changed

tableauserverclient/server/pager.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,6 @@ class Pager(Iterable[T]):
5151
------
5252
ValueError
5353
If the endpoint is not a callable or an Endpoint object.
54-
55-
Examples
56-
--------
57-
>>> # Loop over all workbooks on the site
58-
>>> for workbook in TSC.Pager(server.workbooks):
59-
>>> print(workbook.name)
60-
61-
>>> # Setting page size
62-
>>> request_options = TSC.RequestOptions(pagesize=1000)
63-
>>> all_workbooks = list(TSC.Pager(server.workbooks, request_options))
64-
65-
>>> # Starting on page 2
66-
>>> request_options = TSC.RequestOptions(pagenumber=2)
67-
>>> for workbook in TSC.Pager(server.workbooks, request_options):
68-
>>> print(workbook.name)
69-
70-
>>> # Using in a list comprehension
71-
>>> views = [view for view in TSC.Pager(workbook.views) if "sales" in view.name.lower()]
7254
"""
7355

7456
def __init__(

tableauserverclient/server/request_options.py

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,6 @@ class contained within this class.
5555
pagesize: int, optional
5656
The number of items to return per page. Default is 100. Can also read
5757
from the environment variable `TSC_PAGE_SIZE`
58-
59-
Examples
60-
--------
61-
>>> # Get the first 50 workbooks on the site
62-
>>> request_options = TSC.RequestOptions(pagesize=50)
63-
64-
>>> # Get the next 50 workbooks on the site
65-
>>> request_options.page_number(2)
66-
67-
>>> # Get the first 50 workbooks on the site, sorted by name
68-
>>> request_options = TSC.RequestOptions(pagesize=50)
69-
>>> request_options.sort.add(TSC.Sort(TSC.RequestOptions.Field.Name, TSC.Sort.Direction.Asc))
70-
71-
>>> # Get the first 50 workbooks on the site, filtered by a tag
72-
>>> request_options = TSC.RequestOptions(pagesize=50)
73-
>>> request_options.filter.add(TSC.Filter(TSC.RequestOptions.Field.Tags, TSC.Filter.Operator.Equals, "important"))
74-
7558
"""
7659

7760
def __init__(self, pagenumber=1, pagesize=None):
@@ -293,15 +276,6 @@ class CSVRequestOptions(_DataExportOptions):
293276
maxage: int, optional
294277
The maximum age of the data to export. Shortest possible duration is 1
295278
minute. No upper limit. Default is -1, which means no limit.
296-
297-
Examples
298-
--------
299-
>>> # Export the view to CSV
300-
>>> request_options = TSC.CSVRequestOptions()
301-
>>> request_options.vf("Region", "West")
302-
>>> server.views.populate_csv(view_item, request_options)
303-
>>> with open("output.csv", "wb") as f:
304-
>>> for chunk in view_item.csv():
305279
"""
306280

307281
extension = "csv"
@@ -318,15 +292,6 @@ class ExcelRequestOptions(_DataExportOptions):
318292
maxage: int, optional
319293
The maximum age of the data to export. Shortest possible duration is 1
320294
minute. No upper limit. Default is -1, which means no limit.
321-
322-
Examples
323-
--------
324-
>>> # Export the view to CSV
325-
>>> request_options = TSC.CSVRequestOptions()
326-
>>> request_options.vf("Region", "West")
327-
>>> server.views.populate_csv(view_item, request_options)
328-
>>> with open("output.csv", "wb") as f:
329-
>>> for chunk in view_item.csv():
330295
"""
331296

332297
extension = "xlsx"
@@ -349,15 +314,6 @@ class ImageRequestOptions(_DataExportOptions):
349314
maxage: int, optional
350315
The maximum age of the data to export. Shortest possible duration is 1
351316
minute. No upper limit. Default is -1, which means no limit.
352-
353-
Examples
354-
--------
355-
>>> # Export the view to an image
356-
>>> request_options = TSC.ImageRequestOptions()
357-
>>> request_options.vf("Region", "West")
358-
>>> server.views.populate_image(view_item, request_options)
359-
>>> with open("output.png", "wb") as f:
360-
>>> f.write(view_item.image)
361317
"""
362318

363319
extension = "png"
@@ -400,15 +356,6 @@ class PDFRequestOptions(_DataExportOptions):
400356
401357
viz_width: int, optional
402358
The width of the viz in pixels. If specified, viz_height must also be specified.
403-
404-
Examples
405-
--------
406-
>>> # Export the view to a pdf
407-
>>> request_options = TSC.PDFRequestOptions()
408-
>>> request_options.vf("Region", "West")
409-
>>> server.views.populate_pdf(view_item, request_options)
410-
>>> with open("output.pdf", "wb") as f:
411-
>>> f.write(view_item.pdf)
412359
"""
413360

414361
class PageType:

tableauserverclient/server/sort.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@ class Sort:
1111
direction : str
1212
The direction to sort, either ascending (Asc) or descending (Desc). The
1313
options are defined in the RequestOptions.Direction class.
14-
15-
Examples
16-
--------
17-
18-
>>> # create a new instance of a request option object
19-
>>> req_option = TSC.RequestOptions()
20-
21-
>>> # add the sort expression, sorting by name and direction
22-
>>> req_option.sort.add(TSC.Sort(TSC.RequestOptions.Field.Name,
23-
TSC.RequestOptions.Direction.Asc))
24-
>>> matching_workbooks, pagination_item = server.workbooks.get(req_option)
25-
26-
>>> for wb in matching_workbooks:
27-
>>> print(wb.name)
2814
"""
2915

3016
def __init__(self, field, direction):

0 commit comments

Comments
 (0)