A python library for structural phase transformations