Package: cython-plus
WarningThis is the README for theCython+.
Since Cython+ is heavily based onCython,
you may want to read also theREADME for Cython.*What’s Cython+?The aim of the “Cython+” project is to ensure that all the cores
of a microprocessor can be efficiently exploited with a program
written in Python in the field of system or network programming,
so as to correct the main shortcoming of the Python language and
increase the competitiveness of its ecosystem.  The envisaged
approach consists in transferring the extremely powerful multi-core
concurrent programming model of the Go language to the Python
language by relying on innovative scientific and technological
approaches stemming from three decades of French know-how in the
field of concurrent object programming aroundActalk, and
leveraging the existingCythonlanguage.Cython is actually a superset of the Python language that brings
together the strong typing of Python, performance equivalent to C
and a form of low-level parallelism well suited to scientific
computing. It is with Cython that thescikit-learnlibraries or certain components
of the NEO transactional distributed database are developed. Cython
corrects the shortcomings of the Python language in terms of typing
or performance. Cython also corrects the Global Interpreter Lock
(GIL) problem which is at the origin of the poor support of multi-core
microprocessors in Python.In the “Cython+” project, we propose to remove the GIL in a very
specific way: only at the level of asynchronous Cython functions
not calling Python objects. So nothing is changed in the Python
language nor in the “CPython” runtime which is the reference
implementation of the Python language in C. All programs already
developed in Python remain compatible. We only modify the Cython
compiler and the subpart of the Cython language disjoint from Python,
which we extend with a garbage collector and coroutines that can
be used on a multi-core architecture.Thus, “Cython+” will offer the same kind of coroutine programming
as Go, the same level of parallelism, the same kind of memory
management, the same kind of performance, exception handling that
Go does not fully benefit from, a better concurrent programming
model than Go, a very well-stocked standard library with much broader
community support, and guaranteed memory isolation between threads.
“Cython+” will become an alternative to Go with many advantages,
strengthening the community of the leading development language
that Python has become.Installation and basic useSimply run:pip install cython-plusThen you can use the habitual Cython commands:cython,cythonizeandcygdb, as well as import thecythonmodule from your Python code.Only Python 3.9 on Linux is supported at the moment.
It doesn’t (currently) work on MacOS or Windows.DocumentationProject Website: <https://www.cython.plus/>Documentation:MotivationBasic Syntax (by example)Interacting with Python (by example)ConcurrencyBlog posts and articles:Automatic multithreaded-safe memory managed classes in CythonHowTo Use Cython+ in Jupyter NotebookSandbox (various code snippets and benchmark to help you get started): <https://github.com/abilian/cythonplus-sandbox>DevelopmentProject repository: <https://lab.nexedi.com/nexedi/cython>Alternate repository (read-only): <https://github.com/abilian/cythonplus>CI: <https://github.com/abilian/cythonplus/actions>License & CopyrightCython+ is a (friendly) fork ofCython.Its copyright belongs to the Cython original authors (as listedHere) as well as to the members of theCython+ consortium:Nexedi,Abilian,TeralabandInria.Cython+ is licensed under the permissiveApache License. SeeLICENSE.txt.ContributingWant to contribute to the Cython+ project?Please contact us at <https://www.cython.plus/contact/>.AcknowledgementsCython+ is based on the work of theCython authors.The Cython+ project has been selected to receive funding from the PSPC-Régions 1.
It is supported byCap Digitaland financed by
thePIAand theParis Region.