Machine learning for optimization of the physical layer is currently a popular research topic. To aid research in this field, we introduce our Python library MOKka. We summarize the currently available signal processing modules in the library and explain our design rationale. In order to showcase the utility of this library, we have implemented a demo on joint geometric and probabilistic constellation shaping with a switchable channel model and interactive plotting and controls.