Cython is not only an excellent and widely used tool to speed up computational Python code, it’s also a very comfortable way to talk to native code and libraries. The Cython compiler translates Python code to C or C++ code, and supports static type annotations to allow direct use of C/C++ data types and functions. The tight integration of all three languages makes it possible to freely mix Python features like generators and comprehensions with C/C++ features like native data types, pointer arithmetic or manually tuned memory management in the same code.
This tutorial by a core developer introduces the Cython compiler by interactive code examples, and shows how you can make it generate fast binary modules that talk to native libraries, as easily as Python itself.
Attendees should make sure they have a C compiler installed and configured to build binary Packages for CPython. We will use CPython 3.6/7, although all examples can also be followed with CPython 2.7. If you’re not on Linux, I recomment using a conda environment with gcc.
Update 2018-07-23: Please set up a virtualenv or conda-env with the following tools: