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.
Metadata
Release files for riff-pbix 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| riff_pbix-0.1.0.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| riff_pbix-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.7 kB
Release files / riff_pbix-0.1.0.tar.gz
| Download URL | riff_pbix-0.1.0.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf0b3bda9275eab93e198cfa8f8419a371a3b9353b6dd3c29ddc696a0c53ac17
|
|
BLAKE2b-256 checksum How to use checksums |
de1439c131aba01b4bb70e34abb7795b51be2e1366ec6a225db8a41208ad079b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / riff_pbix-0.1.0-py3-none-any.whl
| Download URL | riff_pbix-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
692fbce12f7a4165b0a9bda28c9034741f1b5a3f4a0512362b85227484e95265
|
|
BLAKE2b-256 checksum How to use checksums |
d3f6dcaa5998c74fc04c05fd5c3f93e0d60c58fa6880c115bdd26f3123ac90c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|