skillfed

pbixray

A Python library to parse and analyze PBIX files used with Microsoft Power BI and Excel PowerPivot.

pbixray v0.15.4 260.1K downloads/30d#8,399 on PyPI140
Permissive license MIT Active released

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 pbixray

uv

uv add pbixray

poetry

poetry add pbixray

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: VisualizationTopic :: Software Development :: Libraries :: Python Modules

Tags

power bi pbix parserextract power bi metadatapower query analysisdax expression extractionpbix file readerpower bi model inspectionpowerbi data model parser
power-bidata-model-inspectionpbix-parser

More Python Modules packages