🌐 PBIX‑Atlas
Full lineage graph for Power BI — from source to visual field
PbixAtlas is an Universal lineage graph for Power BI .pbix files: source to visual field in one traversable graph.
source (HTTP, OData, SQL, file...) --> Power Query (M)
--> column / calculated column --> measure (DAX)
--> field displayed in a report visual
Install
pip install pbix-atlas
# or
uv add pbix-atlas
Quick start
from pbix_atlas import LineageGraphBuilder, upstream, downstream, print_tree, find_nodes
graph = LineageGraphBuilder().build("my_report.pbix")
find_nodes(graph, "customer_name")
print_tree(graph, "visual_field::my_report.pbix::Page1::16::customer_name", direction="upstream")
print_tree(graph, "source::odata::example.com/odata/", direction="downstream")
Export
from pbix_atlas import export_graphml, export_nodes_csv, export_edges_csv, graph_summary
graph_summary(graph) # {'query': 70, 'column': 183, ...}
export_graphml(graph, "lineage.graphml") # Gephi / yEd
export_nodes_csv(graph, "nodes.csv")
export_edges_csv(graph, "edges.csv")
Codegen — standalone Python pipeline
Generates a single Python file reproducing a report's full chain: source → extraction → Power Query → semantic model → Vizro dashboard. The M source is executed at runtime by the built-in interpreter, not pattern-matched. Unimplemented functions raise MRuntimeError (no silent stubs).
pip install "pbix-atlas[codegen]"
pbix-atlas-codegen my_report.pbix -o pipeline.py
from pbix_atlas import generate_python_pipeline
generate_python_pipeline("my_report.pbix", "pipeline.py")
HTTP API / MCP server
uv sync --extra api
uv run pbix-atlas # http://127.0.0.1:8080
- REST:
POST /graphs,/search,/upstream,/downstream,/tree,/export,/codegen - MCP (streamable HTTP):
http://127.0.0.1:8080/mcp/ - Env vars:
PBIX_LINEAGE_HOST,PBIX_LINEAGE_PORT
Architecture
| Module | Responsibility |
|---|---|
models.py |
Node/edge types and shared data structures |
sources.py |
Physical source detection (configurable patterns) |
pbix_model.py |
Adapter isolating from pbixray |
m_lexer.py / m_parser.py |
Built-in M tokenizer and parser |
m_interpreter.py |
M runtime interpreter + stdlib |
dax_translate.py |
DAX → Python (supported subset) |
dax.py |
DAX reference parsing |
mquery.py |
Power Query dependencies (table-level) |
layout.py |
Internal Report/Layout format parsing |
graph_builder.py |
Orchestrator: builds the networkx.DiGraph |
navigation.py |
Upstream/downstream traversal, search, export |
codegen.py |
Python pipeline code generation |
api/app.py |
FastAPI + MCP mount (FastMCP) |
Sample files
- Retail Analysis Sample PBIX (Microsoft)
- Sales & Returns Sample v201912 (Microsoft)
Development
uv sync --extra dev
uv run pytest
uv build
Metadata
Release files for pbix-atlas 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pbix_atlas-1.0.1.tar.gz | 84.6 kB | Without provenance | Details for pbix_atlas-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pbix_atlas-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for pbix_atlas-1.0.1-py3-none-any.whl |
Total release size: 150.2 kB
Release files / pbix_atlas-1.0.1.tar.gz
| Download URL | pbix_atlas-1.0.1.tar.gz |
|---|---|
| Size | 84.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dd697ea9af60db0720e71c0e7371e47db9a0e43b6793319b4a05986e034f7cf
|
|
BLAKE2b-256 checksum How to use checksums |
211e477e023fd52dd4a5819e96f3eb7442380b5c76ddef25e254f20f8276150a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pbix_atlas-1.0.1-py3-none-any.whl
| Download URL | pbix_atlas-1.0.1-py3-none-any.whl |
|---|---|
| Size | 65.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d045aeeb977f95c25ea011d3c0f1629e4eb312f99363f4eec088f705544f2ed
|
|
BLAKE2b-256 checksum How to use checksums |
46a426e21b48c7999122079e04fbff6d297b8eb9c21670344cc552b46c7f2eba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pbix-atlas 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.