Cython: C-Extensions for Python

About Cython

Cython is a language that makes writing C extensions for the Python language as easy as Python itself. Cython is based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.

The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.

This makes Cython the ideal language for wrapping for external C libraries, and for fast C modules that speed up the execution of Python code.

 

We welcome Cython-related student applications for the Google Summer of Code through the Python Foundation as a mentoring organization. Here is a list of possible project ideas.

Sage Dev Days (Seattle, June 2008) will have a strong emphasis on Cython.

Documentation

  • The Cython Wiki has an ever-growing amount of documentation.
  • Official Pyrex Language Overview (note the changes though).
  • Sphinx documentation from Gabriel Gellner.
  • Quick Guide to Pyrex from Michael JasonSmith.
  • SAGE Days 7 talk on writing fast Cython (also a good introduction).
  • Pyrex FAQ and Cython FAQ

    If you still have questions, feel free to send an email to the mailing list.

    People

    Lead Developers: Stefan Behnel and Robert Bradshaw.

    Contributors: Greg Ewing, Martin Albrecht, Gustavo Barbieri, Ondrej Certik, Timothy Clemans, Gary Furnish, Gabriel Gellner, Brian Granger, Thomas Hunger, Kay Hayen, Jim Kleckner, Vasil Manolov, David McNab, Dag Seljebotn, Kirill Smelkov, William Stein, Carl Witty, Felix Wu.

    Download

    Cython is freely available under the open source Apache License.

    The latest release of Cython is 0.9.6.14 (released 2008-05-01). You can download it as a gzipped tar or as a zip file.

    Cython is also available from the PyPi package repository.

    Developer Links

  • Wiki
  • Mailing list and archive
  • Bug & Feature Tracker
  • Mercurial Repository