pbixray
A Python library to parse and analyze PBIX files used with Microsoft Power BI and Excel PowerPivot.
What it is and what it does
PBIXRay is a Python library for reading and analyzing Microsoft Power BI PBIX files, Excel PowerPivot models, and Analysis Services backup files. It extracts the internal data model—tables, columns, relationships, DAX expressions, Power Query code, security rules, and metadata—and exposes them as pandas DataFrames or raw Python objects. The library handles both small models held in memory and large models that exceed available RAM by streaming to disk and memory-mapping the result.
Typical use cases include auditing Power BI models for DAX logic and data lineage, programmatically inspecting security configurations (row-level and object-level security), extracting Power Query transformations for documentation or migration, and bulk-analyzing many PBIX files. The library is the Python implementation of logic from the DuckDB PBIX extension, so it integrates naturally with data analysis workflows that already use pandas and numpy.
Use it for:
- Audit Power BI models for DAX measures, calculated columns, and aggregation rules without opening Power BI Desktop.
- Extract Power Query M code and parameters from PBIX files for documentation or migration to other tools.
- Inspect row-level and object-level security configurations across many Power BI models programmatically.
- Retrieve table data and schema from PBIX files as pandas DataFrames for analysis or export.
- Stream large Power BI tables in chunks to avoid loading entire models into memory.
- Analyze relationships, perspectives, and metadata across a portfolio of Power BI or PowerPivot files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parse and extract metadata, tables, DAX expressions, Power Query code, and security configurations from Microsoft Power BI PBIX files, Excel PowerPivot models, and Analysis Services backup files.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real gap: programmatic inspection of Power BI models without requiring Power BI Desktop. MIT licensing removes legal friction. Install if you need to audit, extract, or analyze PBIX files at scale or in automation; skip if you only work with Power BI interactively.
Install
pbixray on PyPI
pip
pip install pbixrayuv
uv add pbixraypoetry
poetry add pbixrayInstalling pbixray
Before you install
Low friction install with a pure-Python wheel. Actively maintained with a recent release; 140 repository stars indicate modest but steady adoption. Seven runtime dependencies are all established libraries (numpy, pandas, apsw for SQLite, plus xpress and xmhuffman for compression).
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
Quickstart
pip install pbixray
from pbixray import PBIXRay
model = PBIXRay('path/to/your/file.pbix')
tables = model.tables
df = model.get_table('TableName')
Requires Python 3.8 or later. For large models, pass on_disk=True to stream to disk instead of loading the entire decompressed model into memory.
Verify before relying
- Performance characteristics and memory overhead for typical model sizes are not quantified in the fact sheet.
- Compatibility with specific Power BI versions or model complexity limits is not documented in the excerpt.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — xpress8, xpress9, xmhuffman, kaitaistruct, numpy, pandas, apsw |
| Maintenance | actively maintained — 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 260,109/month — #8,399 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pbixray-0.15.4-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
xmhuffmanDecodes canonical-Huffman compressed string…
permissive · top 15,000 on PyPI
xpress8xpress8 provides Python bindings to Microsoft's…
permissive · top 15,000 on PyPI
semantic-link-labsExtends Microsoft Fabric's Semantic Link with…
permissive · top 5,000 on PyPI
azure-mgmt-powerbiembeddedManages Power BI Embedded resources in…
permissive · top 5,000 on PyPI
airflow-powerbi-pluginAn Apache Airflow plugin that triggers Power BI…
unclear · top 15,000 on PyPI
semantic-link-sempyConnects Python notebooks and Spark jobs in…
unclear · top 5,000 on PyPI
semantic-linkConnects Python notebooks to Power BI datasets…
unclear · top 15,000 on PyPI
amazon-dax-clientA Python client library that provides nearly…
permissive · top 15,000 on PyPI
DataPropertyExtracts and classifies properties from…
permissive · top 5,000 on PyPI
pylightxlReads and writes Microsoft Excel files (.xlsx,…
permissive · top 15,000 on PyPI