{"id":37081069,"url":"https://github.com/m-g-90/cpyjava","last_synced_at":"2026-01-14T09:50:41.309Z","repository":{"id":62565210,"uuid":"93237366","full_name":"m-g-90/cpyjava","owner":"m-g-90","description":"python module to use java objects","archived":false,"fork":false,"pushed_at":"2018-03-25T13:09:58.000Z","size":195,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-07T02:48:20.862Z","etag":null,"topics":["c","java","jni","python","python-3","python3"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-g-90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"License.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-03T09:12:16.000Z","updated_at":"2018-03-25T13:08:21.000Z","dependencies_parsed_at":"2022-11-03T16:15:21.985Z","dependency_job_id":null,"html_url":"https://github.com/m-g-90/cpyjava","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/m-g-90/cpyjava","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-g-90%2Fcpyjava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-g-90%2Fcpyjava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-g-90%2Fcpyjava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-g-90%2Fcpyjava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-g-90","download_url":"https://codeload.github.com/m-g-90/cpyjava/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-g-90%2Fcpyjava/sbom","scorecard":{"id":607915,"data":{"date":"2025-08-11","repo":{"name":"github.com/m-g-90/cpyjava","commit":"d697f88661217ceb7049a7a91ca9694377f29de3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: License.md:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: License.md: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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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-21T02:00:57.426Z","repository_id":62565210,"created_at":"2025-08-21T02:00:57.426Z","updated_at":"2025-08-21T02:00:57.426Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["c","java","jni","python","python-3","python3"],"created_at":"2026-01-14T09:50:40.499Z","updated_at":"2026-01-14T09:50:41.303Z","avatar_url":"https://github.com/m-g-90.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![tag](https://img.shields.io/github/tag/m-g-90/cpyjava.svg)](https://github.com/m-g-90/cpyjava/releases) [![license](https://img.shields.io/github/license/m-g-90/cpyjava.svg)](https://github.com/m-g-90/cpyjava/blob/master/License.md)\n\n[![Build Status](https://travis-ci.org/m-g-90/cpyjava.svg?branch=master)](https://travis-ci.org/m-g-90/cpyjava) [![Build status](https://ci.appveyor.com/api/projects/status/ce7afnnx892q5rl0/branch/master?svg=true)](https://ci.appveyor.com/project/m-g-90/cpyjava/branch/master) \n\n[![codecov](https://codecov.io/gh/m-g-90/cpyjava/branch/master/graph/badge.svg)](https://codecov.io/gh/m-g-90/cpyjava)  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/2410def413924018a31c088d65ff5e5e)](https://www.codacy.com/app/m-g-90/cpyjava?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=m-g-90/cpyjava\u0026amp;utm_campaign=Badge_Grade) ![](https://scan.coverity.com/projects/13312/badge.svg)\n\n\ncpyjava is a python extension/module to enable use of java objects from python (cpython). This extension uses JNI to interface with java objects. \n\ncpyjava is available via pip. Please note that at this point in time, no prebuild wheel is available. See [here](https://wiki.python.org/moin/WindowsCompilers) for Windows compilers.\n   \n    pip install cpyjava\n    \n    \nAlternatives/Similar Projects:\n  - JPype also allows cpython to interface with java objects via JNI, however it has the issue that object classes are referenced by name (not by the class object) which leads to issues in more complicated class loader structures.\n  - Py4j is an python module that uses sockets (not JNI) to communicate between python and java.\n\nFeatures:\n  - supports 'isinstanceof'\n  - conversion from/to java primitive types and java.lang.String\n  - java map,list,iterable/iterator and arrays can be used like the equivalent python objects\n  - Any other class/object is wrapped and supported via reflection \n  - \"brute force\" approach to handle function overloading: functions gets selected if the arguments can be converted to the required types\n  - decorators to customize getter,setter and call functionality\n  - function to register an object from java in a python dictionary. This is helpfull to e.g. pass classes of a non-system class loader to python\n  \nPassing python objects to java is currently not planned. Passing python objects that are wrapped java objects is of course possible.\n\nThis module is written exclusively in C. You can use the setup.py to install the module or use the executable project to test this library. Alternatively, this library can be added easily to a project with an embedded python interpreter. Java is required to run this. In case setup.py is used, Java must be installed before setup.py is executed.\n\nNote: the project currently uses a .pro file (qmake/Qt), but doesn't require/use Qt.\n\nExamples:\n\n\n  Use System.out.print:\n    \n    import cpyjava\n    cpyjava.packages.java.lang.System.out.println('Python to Java print call')\n    #alternatively\n    java = cpyjava.packages.java\n    java.lang.System.out.println(\"Python to Java print call\") #this line works here and in java\n    \n    \n Use a java Map (including creation of an instance of a Java Class):\n    \n    import cpyjava\n    map = cpyjava.packages.java.util.HashMap() # calls the java constructor\n    map.put(\"key\",\"value\") \n    repr(map)\n    print(map[\"key\"])\n    \n Accelerate interaction with java by keeping the current thread attached to the jvm:\n    \n    import cpyjava\n    with cpyjava.env:\n      #some code that interacts with java objects\n      pass\n      \n Creating a \"synchronized\" block in python on a java object:\n    \n    import cpyjava\n    map = cpyjava.packages.java.util.HashMap() # create a java object\n    with cpyjava.synchronized(map):\n      map.put(\"key\",1)\n      \n  \nCompiling the Project:\n  - Open the cpyjava.pro project in qtcreator\n  - Adapt the java and python paths/versions \n  \n  or\n  \n  - pip install cpyjava\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-g-90%2Fcpyjava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-g-90%2Fcpyjava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-g-90%2Fcpyjava/lists"}