In python your extension module is the initialization function and This function is called by the Python interpreter when the module is loaded. the function is named initModule.
use the below function in your own module in .py file,
Below is the description of Py_InitModule3 function
1- func: This is the function to be exported.
2- module_methods: This is the mapping table name defined above.
3- docstring: This is the comment you have to give in your extension.