Here is a script template for the "Script Templates" menu in the Text Editor. It provides you with the necessary functions for a PyConstraint set up, and also includes descriptions on what is required in each function.