python version of prov constraints