Cython support in PyCharm 2.0 EAP
Cython is a language that allows you to write C extensions for the Python language using the familiar Python syntax. You can use Cython for creating extensions that can be 50-100 times faster than pure-Python modules. Also Cython allows you to integrate your Python code with C libraries more smoothly than the standard
ctypes library or generated C bindings.
We are currently working on Cython support in PyCharm. Here is an overview of what’s already available in the EAP builds.
First of all, you get Cython syntax highlighting and error checking:
Next, there is context-sensitive code completion for Cython keywords, fields of structs, and attributes of extension types:
We will continue working on code completion for other elements, such as type names.
You can go to definitions and find usages of Cython
cdef variables, functions, structs, and extension types. This is especially useful if you take into account various ways of importing Cython files, such as
include statements and implicit imports of Cython definition files:
We have also adapted some Python inspections and refactorings for Cython. For example, PyCharm will highlight unresolved references in your Cython code:
There are various ways of compiling Cython modules:
setup.py with Cython functions for distutils, Makefiles that directly call the
cython compiler, etc. In PyCharm you can set up any external tool for compiling your Cython code from the IDE:
You can also set up the go to error line functionality via output filters for external tools:
Cython support in PyCharm is still work in progress. More Cython-related features and improvements will be available in PyCharm 2.0 EAP builds in the coming weeks.
Subscribe to Blog updates
PyCharm 2024.1 EAP 7: Support for Flask and FastAPI bigger applications in the Endpoints tool window
Notable updates include support for Flask and FastAPI bigger applications in the Endpoints tool window, improvements to the Version Control integrations and support for WireMock.
PyCharm 2023.3.4: AI Assistant’s Efficiency Boosters and a more powerful Django Structure tool window
This year, we are trying out a new approach with our releases, moving away from a quarterly schedule to more regular monthly feature-rich releases. This change is intended to deliver new features more rapidly and streamline the feedback process. Upgrade to PyCharm 2023.3.4 New AI Assistant…
PyCharm 2024.1 EAP 6: In-editor Code Review
Our new EAP build for PyCharm 2024.1 is now available for you to download! This new build is packed with a bunch of updates to the integration with version control systems. You can download the new version from our website, update directly from the IDE or via the free Toolbox App, or use snaps…