P-graph is a popularly used framework for process network synthesis (PNS) and network topological optimization. This R&D notes introduces a Python interface for P-graph to serve as a linkage to modern programming ecosystems. This allows for a wider application of the fast and efficient P-graph solver, to provide structural and topological enumeration in numerous fields. The proposed framework allows for more integrative usage in Artificial Intelligence (AI), machine learning, process system engineering, chemical engineering and chemometrics. Large and repetitive topologies can also be automated using the new programming interface, saving time and effort in modelling. This short note serves as a demonstration of this open-sourced P-graph interface (code: https://github.com/tsyet12/Pgraph).