Implementation of Cython
To bring your Python into Cython, you must first build a file with the extension .pyx instead of the extension .py. You should start writing standard Python code within this file (note that there are certain restrictions in the Python code that Cython embraces, as explained in the Cython docs).
Cython works by constructing a basic Python package. The action, though, varies from the Python standard in that the module code, initially written in Python, is converted into C. Although the resulting code is quick, several calls are made to the CPython interpreter and standard CPython libraries to do the actual work