Cython is a language that extends Python by adding static typing to functions, variables, and classes. Cython combines the simplicity of Python and the efficiency of C. After rewriting your scripts in Cython you can compile them to C or C++, generating efficient code in a straightforward way.
Cython also acts as a bridge between Python and C, as it can be used to create interfaces to external C code. By creating bindings, you can reuse fast C routines in your scripts, effectively using Python as a glue language.
In this chapter we will learn: