This is an easy to follow sample module that shows you how you can extend Python with C. This example goes hand in hand with the official documentation which is available at the following link: link
I also included keyword arguments and optional arguments in the C extension module. You can simple use these as you wish for your own template needs.
** Important ones:
- test the code throughly
- add custom traceback exceptions
- A regular C extension -- DONE
- Make C API so I can also embed C++ within C
- A complete separate C++ extension