If you were to create an API for Python, you should write it using Cython to create a more type-safe Python API. Or, you could take the C types from Cython to implement the same algorithms in your Python code, and they will be faster because you're specifying the types and you avoid a lot of the type conversion required.
Consider you are implementing a fresh project in C. There are a few issues we always come across in starting fresh; for example, choosing the logging or configuration system we will use or implement.
With Cython, we can reuse the Python logging system as well as the
ConfigParser standard libraries from Python in our C code to get a head start. If this doesn't prove to be the correct solution, we can ...