Most of the computational approaches based on Heyman's theory rely on the safe theorem and can only tackle kinematical problems (KPs) with non-homogeneous boundary displacements for simple geometries. So far, no computational tools have been developed to directly address the KP for generic 2D structures taking into account different mechanical scenarios and foundation settlements simultaneously. With this aim, compas_prd, a new computational Python-based tool has been developed. It is based on the piecewise rigid displacement (PRD) method, which couples the KP with the equilibrium problem (EP), allowing the search for a mechanism and its corresponding internal stress state even in large displacements. Both KP and EP are framed as linear programming problems, allowing fast computational solving. Looking at an approximate cross-section of a multi-span masonry bridge, different mechanical scenarios are addressed to illustrate the abilities of compas_prd, also taking into account an initial deformed configuration.