<p><strong>Abstract.</strong> We developed the <TT>pycraf</TT> Python package, which provides functions and procedures for various tasks related to spectrum-management compatibility studies. This includes an implementation of ITU-R Rec. P.452 (ITU-R, 2015), which allows to calculate the path attenuation arising from the distance and terrain properties between an interferer and the victim service. A typical example would be the calculation of interference levels at a radio telescope produced from a radio broadcasting tower. Furthermore, <TT>pycraf</TT> provides functionality to calculate atmospheric attenuation as proposed in ITU-R Rec. P.676 (ITU-R, 2013).</p><p>Using the rich ecosystem of scientific Python libraries and our <TT>pycraf</TT> package, we performed a large number of compatibility studies. Here, we will highlight a recent case study, where we analysed the potential harm that the next-generation cell-phone standard 5G could bring to observations at a radio observatory. For this we implemented a Monte-Carlo simulation to deal with the quasi-statistical spatial distribution of base stations and user devices around the radio astronomy station.</p>