{"id":13448149,"url":"https://github.com/cython/cython","last_synced_at":"2026-01-04T15:12:29.908Z","repository":{"id":1193975,"uuid":"1099265","full_name":"cython/cython","owner":"cython","description":"The most widely used Python to C compiler","archived":false,"fork":false,"pushed_at":"2025-05-12T09:03:10.000Z","size":75625,"stargazers_count":9987,"open_issues_count":1437,"forks_count":1525,"subscribers_count":238,"default_branch":"master","last_synced_at":"2025-05-12T18:13:02.883Z","etag":null,"topics":["big-data","c","cpp","cpython","cpython-extensions","cython","performance","python"],"latest_commit_sha":null,"homepage":"https://cython.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cython.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"COPYING.txt","code_of_conduct":".github/code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"scoder","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"pypi/Cython","community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2010-11-21T07:44:20.000Z","updated_at":"2025-05-12T15:58:59.000Z","dependencies_parsed_at":"2023-12-23T21:45:10.879Z","dependency_job_id":"b41006b4-3807-494a-b2fb-d0c1978a882d","html_url":"https://github.com/cython/cython","commit_stats":{"total_commits":16479,"total_committers":541,"mean_commits":30.46025878003697,"dds":0.4275138054493598,"last_synced_commit":"4201ff0b97058b8cdf607f458226b0b939e0712d"},"previous_names":[],"tags_count":211,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cython%2Fcython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cython%2Fcython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cython%2Fcython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cython%2Fcython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cython","download_url":"https://codeload.github.com/cython/cython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253795161,"owners_count":21965487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["big-data","c","cpp","cpython","cpython-extensions","cython","performance","python"],"created_at":"2024-07-31T05:01:37.055Z","updated_at":"2026-01-04T15:12:29.870Z","avatar_url":"https://github.com/cython.png","language":"Python","readme":"Welcome to Cython!\n==================\n\nCython is an optimising Python compiler that makes writing C extensions for\nPython as easy as Python itself.\n\nCython translates Python code to C/C++ code, but additionally supports calling\nC functions and declaring C types on variables and class attributes.\nThis allows broad to fine-grained manual tuning that lets the compiler\ngenerate very efficient C code from Cython code.\n\nThis makes Cython the ideal language for wrapping external C libraries, and\nfor fast C modules that speed up the execution of Python code.\n\n* Official website: https://cython.org/\n* Documentation: https://docs.cython.org/\n* Github repository: https://github.com/cython/cython\n* Wiki: https://github.com/cython/cython/wiki\n\nCython has `more than 70 million downloads \u003chttps://pypistats.org/packages/cython\u003e`_\nper month on PyPI.  You can **support the Cython project** via\n`Github Sponsors \u003chttps://github.com/users/scoder/sponsorship\u003e`_ or\n`Tidelift \u003chttps://tidelift.com/subscription/pkg/pypi-cython\u003e`_.\n\n\nInstallation:\n-------------\n\nIf you already have a C compiler, just run following command::\n\n   pip install Cython\n\notherwise, see `the installation page \u003chttps://docs.cython.org/en/latest/src/quickstart/install.html\u003e`_.\n\n\nLicense:\n--------\n\nThe original Pyrex program, which Cython is based on, was licensed \"free of restrictions\" (see below).\nCython itself is licensed under the permissive **Apache License**.\n\nSee `LICENSE.txt \u003chttps://github.com/cython/cython/blob/master/LICENSE.txt\u003e`_.\n\n\nContributing:\n-------------\n\nWant to contribute to the Cython project?\nHere is some `help to get you started \u003chttps://github.com/cython/cython/blob/master/docs/CONTRIBUTING.rst\u003e`_.\n\n\nDifferences to other Python compilers\n-------------------------------------\n\nStarted as a project in the early 2000s, Cython has outlived\n`most other attempts \u003chttps://wiki.python.org/moin/PythonImplementations#Compilers\u003e`_\nat producing static compilers for the Python language.\n\nSimilar projects that have a relevance today include:\n\n* `PyPy \u003chttps://www.pypy.org/\u003e`_, a Python implementation with a JIT compiler.\n\n  * Pros: JIT compilation with runtime optimisations, fully language compliant,\n    good integration with external C/C++ code\n  * Cons: non-CPython runtime, relatively large resource usage of the runtime,\n    limited compatibility with CPython extensions, non-obvious performance results\n\n* `Numba \u003chttp://numba.pydata.org/\u003e`_, a Python extension that features a\n  JIT compiler for a subset of the language, based on the LLVM compiler\n  infrastructure (probably best known for its ``clang`` C compiler).\n  It mostly targets numerical code that uses NumPy.\n\n  * Pros: JIT compilation with runtime optimisations\n  * Cons: limited language support, relatively large runtime dependency (LLVM),\n    non-obvious performance results\n\n* `Pythran \u003chttps://pythran.readthedocs.io/\u003e`_, a static Python-to-C++\n  extension compiler for a subset of the language, mostly targeted\n  at numerical computation.  Pythran can be (and is probably best) used\n  as an additional\n  `backend for NumPy code \u003chttps://cython.readthedocs.io/en/latest/src/userguide/numpy_pythran.html\u003e`_\n  in Cython.\n\n* `mypyc \u003chttps://mypyc.readthedocs.io/\u003e`_, a static Python-to-C extension\n  compiler, based on the `mypy \u003chttp://www.mypy-lang.org/\u003e`_ static Python\n  analyser.  Like Cython's\n  `pure Python mode \u003chttps://cython.readthedocs.io/en/latest/src/tutorial/pure.html\u003e`_,\n  mypyc can make use of PEP-484 type annotations to optimise code for static types.\n\n  * Pros: good support for language and PEP-484 typing, good type inference,\n    reasonable performance gains\n  * Cons: no support for low-level optimisations and typing,\n    opinionated Python type interpretation, reduced Python compatibility\n    and introspection after compilation\n\n* `Nuitka \u003chttps://nuitka.net/\u003e`_, a static Python-to-C extension compiler.\n\n  * Pros: highly language compliant, reasonable performance gains,\n    support for static application linking (similar to\n    `cython_freeze \u003chttps://github.com/cython/cython/blob/master/bin/cython_freeze\u003e`_\n    but with the ability to bundle library dependencies into a self-contained\n    executable)\n  * Cons: no support for low-level optimisations and typing\n\nIn comparison to the above, Cython provides\n\n* fast, efficient and highly compliant support for almost all\n  Python language features, including dynamic features and introspection\n* full runtime compatibility with all still-in-use and future versions\n  of CPython\n* \"generate once, compile everywhere\" C code generation that allows for\n  reproducible performance results and testing\n* C compile time adaptation to the target platform and Python version\n* support for other C-API implementations, including PyPy and Pyston\n* seamless integration with C/C++ code\n* broad support for manual optimisation and tuning down to the C level\n* a large user base with thousands of libraries, packages and tools\n* more than two decades of bug fixing and static code optimisations\n\n\nThe following is from Pyrex:\n------------------------------------------------------\nCython was originally based on `Pyrex \u003chttps://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/\u003e`_\nby Greg Ewing, with the following written in the Pyrex readme document:\n\nThis is a development version of Pyrex, a language\nfor writing Python extension modules.\n\nFor more info, take a look at:\n\n* Doc/About.html for a description of the language\n* INSTALL.txt    for installation instructions\n* USAGE.txt      for usage instructions\n* Demos          for usage examples\n\nComments, suggestions, bug reports, etc. are most\nwelcome!\n\nCopyright stuff: Pyrex is free of restrictions. You\nmay use, redistribute, modify and distribute modified\nversions.\n\nThe latest version of Pyrex can be found `here \u003chttps://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/\u003e`_.\n\n| Greg Ewing, Computer Science Dept\n| University of Canterbury\n| Christchurch, New Zealand\n\n A citizen of NewZealandCorp, a wholly-owned subsidiary of USA Inc.\n","funding_links":["https://github.com/sponsors/scoder","https://tidelift.com/funding/github/pypi/Cython","https://tidelift.com/subscription/pkg/pypi-cython"],"categories":["Scripting","Python","\u003ca id=\"tag-dev\" href=\"#tag-dev\"\u003eDev\u003c/a\u003e","Static","HarmonyOS","Basic Components","实现","Software","正则表达式","Cython","Python / C++","Compilers","Implementations","Supersets of Python"],"sub_categories":["\u003ca id=\"tag-dev-other\" href=\"#tag-dev-other\"\u003eOther Dev projects\u003c/a\u003e","Windows Manager","Python Performance Booster","Cython implementation","Other dialects and variants","脚本","Mojo🔥FastAPI Client"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcython%2Fcython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcython%2Fcython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcython%2Fcython/lists"}