{"id":29873106,"url":"https://github.com/syrte/cyper","last_synced_at":"2026-04-01T20:29:47.182Z","repository":{"id":62566197,"uuid":"142403773","full_name":"syrte/cyper","owner":"syrte","description":"Cython performed inline: compile and run your Cython snippets on the fly.","archived":false,"fork":false,"pushed_at":"2022-02-06T08:43:26.000Z","size":29,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-23T07:17:29.978Z","etag":null,"topics":["compilation","compiling","cython","numpy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syrte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-26T07:17:42.000Z","updated_at":"2023-02-13T13:15:12.000Z","dependencies_parsed_at":"2022-11-03T16:15:57.449Z","dependency_job_id":null,"html_url":"https://github.com/syrte/cyper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syrte/cyper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Fcyper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Fcyper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Fcyper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Fcyper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syrte","download_url":"https://codeload.github.com/syrte/cyper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Fcyper/sbom","scorecard":{"id":863770,"data":{"date":"2025-08-11","repo":{"name":"github.com/syrte/cyper","commit":"53622f7e34d59bafde2473f592b1e051cca31c7c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T02:07:24.310Z","repository_id":62566197,"created_at":"2025-08-24T02:07:24.310Z","updated_at":"2025-08-24T02:07:24.310Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["compilation","compiling","cython","numpy","python"],"created_at":"2025-07-30T22:15:52.654Z","updated_at":"2026-04-01T20:29:47.161Z","avatar_url":"https://github.com/syrte.png","language":"Python","readme":"# cyper\n\n**Cy**thon **per**formed inline: compile and run your Cython snippets on the fly.\n\nIt is aiming to provide a flexible alternative to the IPython Cython magic command outside the IPython/Jupyter environment.\n\n## Features\n\n- Simple, get rid of the tedious setup files or makefile.\n- Smart, auto-detect and set compiler flags for Numpy and OpenMP.\n- Highly customizable, allow one to set Cython directives, environment variables and compiler options.\n\n## Usage\n\n### Basic usage\n\n- Basic usage\n  ```python\n  import cyper\n  \n  code = r'''\n  def func(x):\n      return 2.0 * x\n  '''\n  \n  pyx = cyper.inline(code)\n  pyx.func(1)\n  # 2.0\n  ```\n  Raw string is recommended to avoid breaking escape character.\n\n- It is convenient (though usually not encouraged) to export the variables from compiled module to the current namespace\n  ```python\n  cyper.inline(code, globals())\n  func(1)\n  ```\n\n- Example of using Numpy array and external gsl library, assuming gsl installed at `/opt/gsl/`\n  ```python\n  code = r'''\n  import numpy as np\n  \n  cdef extern from \"gsl/gsl_math.h\":\n      double gsl_pow_int (double x, int n)\n  \n  def pow(double x, int n):\n      y = gsl_pow_int(x, n)\n      return y\n  \n  def pow_array(double[:] x, int n):\n      cdef:\n          int i, m=len(x)\n          double[:] y=np.empty(m, dtype='f8')\n      for i in range(m):\n          y[i] = gsl_pow_int(x[i], n)\n      return y.base\n  '''\n  \n  pyx = cyper.inline(\n      code,\n      include_dirs=['/opt/gsl/include/'],\n      library_dirs=['/opt/gsl/lib'],\n      libraries=['gsl', 'gslcblas']\n  )\n  \n  pyx.pow(2, 6)\n  # 64.0\n  \n  import numpy as np\n  pyx.pow_array(np.arange(5, dtype='f8'), 2)\n  # array([ 0.,  1.,  4.,  9., 16.])\n  ```\n  \n- Get better performance (at your own risk) with arrays\n  ```python\n  cyper.inline(code, fast_indexing=True)\n  # it is equivalent to\n  cyper.inline(code, directives=dict(boundscheck=False, wraparound=False))\n  ```\n\n### Advanced usage\n\n- Set the compiler options, e.g., compiling OpenMP codes with gcc\n  ```python\n  cyper.inline(openmpcode,\n               extra_compile_args=['-fopenmp'],\n               extra_link_args=['-fopenmp'],\n               )\n  # use '-openmp' or '-qopenmp' (\u003e=15.0) for Intel\n  # use '/openmp' for Microsoft Visual C++ Compiler\n  # use '-fopenmp=libomp' for Clang\n  ```\n  Or equivalently write this for short\n  ```python\n  cyper.inline(openmpcode, openmp='-fopenmp')\n  ```\n  \n  The cython `directives` and distutils `extension_args` can also be set in a directive comment at the top of the code snippet, e.g.,\n  ```python\n  code = r'''\n  # cython: boundscheck=False, wraparound=False, cdivision=True\n  # distutils: extra_compile_args = -fopenmp\n  # distutils: extra_link_args = -fopenmp\n  ...\u003ccode\u003e...\n  '''\n  cyper.inline(code)\n  ```\n\n- Set environment variables, e.g., using icc to compile\n  ```python\n  cyper.inline(code, environ={'CC':'icc', 'LDSHARED':'icc -shared'})\n  ```\n  See https://software.intel.com/en-us/articles/thread-parallelism-in-cython\n\n- Set directory for searching cimport (.pxd file)\n  ```python\n  cyper.inline(code, cimport_dirs=[custom_path]})\n  # or equivalently\n  cyper.inline(code, cythonize_args={'include_path': [custom_path]})\n  ```\n  Try setting `cimport_dirs=sys.path` if Cython can not find the installed cimport modules.\n\n## Installation\n\n- Dependencies: Cython\n\n- Installation:\n  ```bash\n  pip install cyper\n  ```\n\n## License\n\nCyper is licensed under the [MIT License](https://github.com/syrte/cyper/blob/master/LICENSE)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrte%2Fcyper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyrte%2Fcyper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrte%2Fcyper/lists"}