skillfed

Cython

The Cython compiler for writing C extensions in the Python language.

cython Permissive license Apache-2.0 Active 10,825 v3.2.9 released

Install

cython on PyPI

pip

pip install cython

uv

uv add cython

poetry

poetry add cython

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 20 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: cython-3.2.9-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: CProgramming Language :: C++Programming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Python :: Implementation :: StacklessTopic :: Software Development :: Code GeneratorsTopic :: Software Development :: CompilersTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

About Cython

from the package's own PyPI description — quoted content, verbatim

The Cython language makes writing C extensions for the Python language as easy as Python itself. Cython is a source code translator based on Pyrex_, but supports more cutting edge functionality and optimizations.

The Cython language is a superset of the Python language (almost all Python code is also valid Cython code), but Cython additionally supports optional static typing to natively call C functions, operate with C++ classes and declare fast 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 writing glue code for external C/C++ libraries, and for fast C modules that speed up the execution of Python code.

The newest Cython release can always be downloaded from https://cython.org/. Unpack the tarball or zip file, enter the directory, and then run::

pip install .

Note that for one-time builds, e.g. for CI/testing, on platforms that are not covered by one of the wheel packages provided on PyPI and the pure Python wheel that we provide is not used, it is substantially faster than a full source build to install an uncompiled (slower) version of Cython...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Cython is a source-to-source compiler that translates Python code with optional static type annotations into C, enabling you to write fast C extensions and glue code for C/C++ libraries while keeping Python syntax.

Low friction: pure Python wheel available, no runtime dependencies, and actively maintained with releases every few weeks. Latest commit is recent (2026-08-12) and the project has strong community engagement (10825 stars).

Apache-2.0 is permissive; you may use, modify, and distribute Cython-compiled code or extensions with minimal legal friction, provided you retain license notices.

Usage

pip install cython==3.2.9

from Cython.Build import cythonize

Requires Python ≥3.8; compiling Cython code to C extensions typically requires a C compiler (gcc, clang, MSVC) on the target system.

Verdict: Cython 3.2.9 is a stable, actively maintained compiler for writing performant C extensions in Python syntax. Zero known vulnerabilities, permissive licensing, and no runtime dependencies make it a low-risk choice. Recent bug fixes address edge cases in list indexing, closures, and string concatenation. Suitable for production use where C-level performance or C/C++ interop is needed.

Needs verification

  • Whether the pure Python wheel (mentioned in description) is actually used by default or if C compilation is required for optimal performance on all platforms.
  • Specific performance gains achievable with static typing vs. standard Python on typical workloads.
python to c compilerc extensions for pythoncython static typingfast python with cc++ bindings pythonpython performance optimizationcompiled python code

Similar packages