-
Notifications
You must be signed in to change notification settings - Fork 0
Objects
The objects currently available in python-pbi
to manipulate Power BI reports are the following:
This class is used to interact with the Power BI service and to store the configuration. It is currently holding the following:
-
'config'
: A configuration dictionary; -
download_folder
: The folder to download the Power BI reports into from the service; -
upload_folder
: The folder holding the Power BI reports to upload to the service.
This class represents the Power BI report itself, with all the report-level attributes (connections, filters, etc.). It consists of the folling:
-
achive_format
:'zip'
; -
connections
: A dictionary holding dataset information; -
ext
:pbix
; -
filename
: The name of the Power BI file (without extension) to save as; -
filters
: A list ofPbiFilter
objects (the report-level filters); -
folder
: The folder to save this file into; -
layout
: APbiLayout
object; -
temp_folder
: A temporary folder to use to unzip the Power BI file.
An object holding all the specific information about the report layout:
-
'id'
: A number, e.g.3001718
; -
'reportId'
: A number, e.g.1398730
; -
'resourcePackages'
: A list of resource packages; -
'sections'
: A list ofPbiPage
objects; -
'config'
: APbiConfig
object; - 'layoutOptimization'
:
0or
1`; -
'publicCustomVisuals'
: A list.
This corresponds to a page in the Power BI report, also called section. Its structure is as below:
-
'name'
: The Power BI internal name for the page, starting with'ReportSection'
, e.g.'ReportSection914cd860e217720387dd'
; -
'displayName'
: The page name shown in the Power BI app or service, e.g.'Page 1'
; -
'filters'
: A list ofPbiFilter
objects (the page-level filters); -
'ordinal'
: An integer, e.g.1
; -
'visualContainers'
: A list ofPbiContainer
objects; -
'config'
: APbiConfig
object; -
'displayOption'
:0
or1
; -
'width'
: The page canvas width in pixels, e.g.1280
; -
'height'
: The page canvas height in pixels, e.g.720
;
This is the base container class, describing all objects on a Power BI page layout (slicers, visuals, etc.) It has the following information:
-
'id'
: A number, e.g.495217558
; -
'x'
: A number, e.g.180.91680814940577
; -
'y'
: A number, e.g.679.660441426146
; -
'z'
: A number, e.g.6000
; -
'width'
: A number, e.g.168.69269949066214
; -
'height'
: A number, e.g.40.33955857385399
; -
'config'
: APbiConfig
object; -
'filters'
: A list ofPbiFilter
objects (the visual-level filters); -
'tabOrder'
: A number, e.g.6000
.
A class representing the Power BI filters. These can be at report level, page level, or visual level.
This class is used by many objects (visuals, pages, etc.) and holds most of their configuration (style, options, etc.)
This class corresponds to the report bookmarks.