{"id":50532886,"url":"https://github.com/moqui/moqui-jep","last_synced_at":"2026-06-03T15:01:47.589Z","repository":{"id":357691013,"uuid":"1216247038","full_name":"moqui/moqui-jep","owner":"moqui","description":"Moqui-Jep embeds CPython in Java through JNI","archived":false,"fork":false,"pushed_at":"2026-05-13T21:07:09.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-13T23:12:53.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moqui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-20T18:04:01.000Z","updated_at":"2026-05-13T21:07:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/moqui/moqui-jep","commit_stats":null,"previous_names":["moqui/moqui-jep"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/moqui/moqui-jep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqui%2Fmoqui-jep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqui%2Fmoqui-jep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqui%2Fmoqui-jep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqui%2Fmoqui-jep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moqui","download_url":"https://codeload.github.com/moqui/moqui-jep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moqui%2Fmoqui-jep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33870026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-03T15:01:46.433Z","updated_at":"2026-06-03T15:01:47.575Z","avatar_url":"https://github.com/moqui.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moqui JEP - Java Embedded Python\nJep embeds CPython in Java through JNI.\n\nMoqui tool component that adds Python script execution through Jep.\n\nWhat this component contains:\n\n- The JepToolFactory\n- The PythonScriptRunner\n- The PythonServiceRunner\n- Python package requirements\n- Root Gradle helpers to prepare `runtime/python_venv`\n\nDefault behavior:\n\n- Moqui starts even if Python/Jep is not installed\n- Python scripts become available only when the venv contains Jep and its native library\n- Use `./gradlew moquiJepSetup` to prepare the local Python environment\n\nTypical service definition:\n\n\u003cservice verb=\"run\" noun=\"Something\" type=\"python\" location=\"component://component-name/script/RunSomething.py\"/\u003e\n\n## Concurrency and the GIL\n\nBoth `SharedInterpreter` and `SubInterpreter` (in the default `legacy` mode) share the same CPython process and serialize through the Global Interpreter Lock. Concurrent Moqui threads calling Python services will therefore queue at the GIL — which is fine for training, simulation, or batch inference, but becomes a bottleneck under high concurrent HTTP load.\n\n`SubInterpreterOptions.isolated()` (enabled via `-Djep_sub_opts=isolated`, requires Python 3.12+ with experimental per-interpreter GIL) can eventually lift this constraint, but it is still experimental upstream. Select the interpreter mode with the `-Djep_sandboxed_interpreter=true` system property (default: `false`, i.e. `SharedInterpreter`).\n\nFor latency-sensitive concurrent inference workloads, consider delegating to an out-of-process runtime (ONNX Runtime, TorchServe, Triton) and calling it from a standard Moqui service rather than routing through moqui-jep.\n\n## Examples and tests:\n\n- `src/test/groovy/JepServiceTests.groovy` covers Moqui service/script integration\n- `src/test/groovy/JepDocsExamplesTests.groovy` contains small examples inspired by the Jep wiki:\n  - How Jep Works\n  - Numpy Usage\n  - Interactive Console\n- Run them with `./gradlew :runtime:component:moqui-jep:test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoqui%2Fmoqui-jep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoqui%2Fmoqui-jep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoqui%2Fmoqui-jep/lists"}