While we do not recomment doing serious work using restraints written it python, it is often useful when prototyping or testing code. Copy this example and modify as needed.