Example of Py Constraints in 2.5?

Does anyone know where i can find a template or example of how to write a py constraint in 2.5. I have not written one before at all, but I assume there are changes from 2.4.

thanks!