PyMad is a python API for Mad-X.
MadX is a software package to simulate particle accelerators and is used at CERN and all around the world. MadX has its own proprietary scripting language and is usually launched from the command line.
The source is available at https://github.com/pymad/pymad
Bugs can be reported at https://github.com/pymad/pymad/issues