Skip to content

Add JEP support as a PythonExecutor implementation (V1.1.0) #9

@maksymuimanov

Description

@maksymuimanov

Currently, Python execution is supported through external runtimes (CPython, Docker sandbox) or planned JVM integrations (GraalPy, Jython). However, there is no support for JEP (Java Embedded Python), a lightweight CPython embedding library that allows direct execution of Python code inside the JVM with minimal overhead. This limits users who want native CPython performance while still avoiding the complexity of external processes.

  • Add a new implementation of PythonExecutor backed by JEP.
  • Provide seamless integration with existing APIs (PythonExecutorFactory, Spring Boot autoconfiguration).
  • Enable execution of Python scripts and direct exchange of variables between Java and Python.
  • Support configuration options for JEP initialization (e.g., shared interpreter, threading mode, module path).

JEP provides close-to-native CPython performance while keeping execution inside the JVM.
This executor could be especially valuable for workloads requiring NumPy, SciPy, or TensorFlow, since JEP supports direct use of CPython’s C extensions.
Target release: V1.1.0 as a main executor module (e.g., spring-boot-python-executor-jep-executor-starter).
Documentation update needed with setup instructions (native library dependencies, classpath configuration, usage example).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestjavaPull requests that update java code

Projects

Status

In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions