Python wrappers for magma