Skip to content

pyDEXPI

Python toolkit for importing, analyzing, and visualizing DEXPI engineering models

pyDEXPI Overview

Overview

pyDEXPI is an open-source engineering toolkit for Process Flow Diagrams (PFDs) and Piping and Instrumentation Diagrams (P&IDs) using the DEXPI standard. Import and export models, analyze their connectivity, and visualize diagrams through a Python library, CLI, or MCP server.

Import diagnostics, model validation, and format-fidelity tests support reliable data exchange. Generated Pydantic classes provide the model foundation; pyDEXPI adds the tools for engineering applications, automation, and AI-assisted workflows.

Implements DEXPI version 2.0.1 (pydexpi.DEXPI_SPEC_VERSION), and writes DEXPI 2.0.1 XML and JSON. DEXPI 2.0 files are read too, converted to 2.0.1 as they load.

📥 Import and Export

Load and save DEXPI XML and JSON, import legacy Proteus XML, and inspect parsing diagnostics. See the serialization guide.

🔍 Analysis and Queries

Find objects, inspect connectivity and paths with the Query API, and analyze topology with NetworkX graphs.

🖼️ Visualization

Render diagrams and component symbols to SVG, with optional PNG and PDF exports.

✅ Validation

Check a model against DEXPI's mandatory rules and pyDEXPI's recommendations.

⚙️ Python, CLI, and MCP

Build Python integrations, run conversions and exports with the CLI, or give an LLM client model tools through the MCP server.

🤖 Synthetic P&IDs

Assemble diagram patterns you provide into synthetic P&IDs for research and AI/ML datasets. See synthetic P&ID generation.

Choose Your Interface

Interface Use it for Guide
Python library Integrations, analysis, and rendering Usage and API reference
CLI (pydexpi) Model summaries, format conversion, rendering, and table/graph exports CLI
MCP server (pydexpi-mcp) Agent workflows for loading, querying, validation, and export MCP server

Quick Start

pip install pydexpi

See the Usage Guide for detailed examples and the Installation section for more options.

Citation

If you use pyDEXPI in your research, please cite:

Goldstein, D. P., Schulze Balhorn, L., Alimin, A. A., & Schweidtmann, A. M. (2025). pyDEXPI: A Python framework for piping and instrumentation diagrams using the DEXPI information model. Proceedings of ESCAPE35, Ghent, Belgium. https://doi.org/10.69997/sct.139043

View the full BibTeX citation in the Usage Guide.

Team

Built by the Process Intelligence Research group at TU Delft.

Learn more on the About page.