Examples of safe coding practice for Python C extensions.
Examples of reliable coding of Python 'C' extensions by Paul Ross.
The full documentation is on Read the Docs.
Code examples and documentation source are right here on GitHub.