A python library for macro operations