Parse Power BI PBIX files and generate a structured app plan.
Project description
riff-pbix
Parse Power BI .pbix files and generate a structured app plan.
Install
pip install riff-pbix
Quick start
import zipfile
from riff_pbix import (
parse_report_layout,
parse_data_model,
parse_mashup,
parse_connections,
infer_model_from_references,
build_lineage,
generate_plan,
)
with zipfile.ZipFile("report.pbix") as z:
layout = parse_report_layout(z)
model = parse_data_model(z)
mashup = parse_mashup(z)
connections = parse_connections(z)
if not model or model.get("is_missing"):
model = infer_model_from_references(layout.get("all_visuals_flat", []))
lineage = build_lineage(
layout.get("all_visuals_flat", []),
model,
mashup.get("queries", []) if mashup else [],
)
analysis_result = {
"filename": "report.pbix",
"parsed_layout": layout,
"parsed_model": model,
"parsed_mashup": mashup,
"connections": connections,
}
plan = generate_plan(analysis_result)
print(plan.json(indent=2))
CLI
Generate a plan JSON from a PBIX file:
riff-pbix path\to\report.pbix --pretty
Output the full analysis payload:
riff-pbix path\to\report.pbix --analysis --pretty
Write output to a file:
riff-pbix path\to\report.pbix --output report_plan.json --pretty
Notes
- The parser reads the PBIX as a zip archive and extracts
Report/Layout,DataModelSchema,DataMashup, andConnectionswhen present. - If the model is missing, you can infer a lightweight model from visual usage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
riff_pbix-0.1.0.tar.gz
(14.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
riff_pbix-0.1.0-py3-none-any.whl
(14.2 kB
view details)
File details
Details for the file riff_pbix-0.1.0.tar.gz.
File metadata
- Download URL: riff_pbix-0.1.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf0b3bda9275eab93e198cfa8f8419a371a3b9353b6dd3c29ddc696a0c53ac17
|
|
| MD5 |
0dfd9cb1dc74c39c3e24c21a4156d540
|
|
| BLAKE2b-256 |
de1439c131aba01b4bb70e34abb7795b51be2e1366ec6a225db8a41208ad079b
|
File details
Details for the file riff_pbix-0.1.0-py3-none-any.whl.
File metadata
- Download URL: riff_pbix-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692fbce12f7a4165b0a9bda28c9034741f1b5a3f4a0512362b85227484e95265
|
|
| MD5 |
2bcbbca5ed17f3fb62d116788b43e39b
|
|
| BLAKE2b-256 |
d3f6dcaa5998c74fc04c05fd5c3f93e0d60c58fa6880c115bdd26f3123ac90c1
|