fix #32

add code to creat constraints in python