pemja
PemJa
What it is and what it does
PemJa is a cross-language FFI framework that bridges Python and Java, allowing bidirectional method invocation. From Java, you can instantiate a Python interpreter, execute Python code, call Python functions, and retrieve results as typed Java objects. From Python, you can locate and invoke Java classes and methods. The package ships as prebuilt wheels for Python 3.8–3.13 on macOS and Linux, with a single runtime dependency on find-libpython.
Typical use cases include embedding Python scripting in Java applications, automating Python workflows from Java, or building polyglot systems where performance-critical code runs in Java and data processing or prototyping happens in Python. Installation is straightforward via pip on supported platforms, though Windows builds require manual setup and the aging maintenance status suggests the project may not be actively developed.
Use it for:
- Embed Python scripting logic into a Java application without spawning separate processes.
- Call Java libraries from Python code to leverage existing Java ecosystems or performance-critical components.
- Build data pipelines where Java handles I/O and Python handles numerical or ML transformations.
- Prototype algorithms in Python and invoke them from a production Java service.
- Implement Python callbacks that respond to events or requests originating in Java.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PemJa enables Python code to call Java methods and classes, and Java code to invoke Python functions, using FFI-based cross-language interoperability.
Yes, if you need bidirectional Python-Java interop and can tolerate aging maintenance. The package is stable (Production/Stable classifier), has no known vulnerabilities, and covers modern Python versions with prebuilt wheels. However, the 413-day release gap suggests limited ongoing support; evaluate whether the project's maturity and your platform requirements align before committing to a production dependency.
Install
pemja on PyPI
pip
pip install pemjauv
uv add pemjapoetry
poetry add pemjaInstalling pemja
Before you install
Medium install friction due to native wheels and a runtime dependency on find-libpython. Prebuilt wheels cover Python 3.8–3.13 on macOS (Intel and ARM) and Linux x86_64, but the package is aging—last release was 413 days ago.
License in practice
Apache 2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install pemja
# In Java:
PythonInterpreterConfig config = PythonInterpreterConfig
.newBuilder()
.setPythonExec("python3")
.build();
PythonInterpreter interpreter = new PythonInterpreter(config);
interpreter.set("a", 12345);
interpreter.get("a", Integer.class);
Requires Java 8 or 11 with $JAVA_HOME set; on Windows, Microsoft Visual C++ 14.0 or greater is required. Python >= 3.8.
Verify before relying
- Whether the 413-day gap since last release indicates active maintenance or dormancy.
- Performance characteristics and overhead of the FFI bridge for typical workloads.
- Compatibility with Python versions beyond 3.13 or Java versions beyond 11.
Package facts
| License | https://www.apache.org/licenses/LICENSE-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — find-libpython |
| Maintenance | aging — 413 days since the last release |
| First released | |
| Downloads | 227,162/month — #9,184 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pemja-0.6.1-cp310-cp310-macosx_10_9_x86_64.whl; pemja-0.6.1-cp310-cp310-macosx_11_0_arm64.whl; pemja-0.6.1-cp310-cp310-manylinux1_x86_64.whl; pemja-0.6.1-cp311-cp311-macosx_10_9_x86_64.whl; pemja-0.6.1-cp311-cp311-macosx_11_0_arm64.whl; pemja-0.6.1-cp311-cp311-manylinux1_x86_64.whl; pemja-0.6.1-cp312-cp312-macosx_10_13_x86_64.whl; pemja-0.6.1-cp312-cp312-macosx_11_0_arm64.whl; pemja-0.6.1-cp312-cp312-manylinux1_x86_64.whl; pemja-0.6.1-cp313-cp313-macosx_10_13_x86_64.whl; pemja-0.6.1-cp313-cp313-macosx_11_0_arm64.whl; pemja-0.6.1-cp313-cp313-manylinux1_x86_64.whl; pemja-0.6.1-cp313-cp313t-macosx_10_13_x86_64.whl; pemja-0.6.1-cp313-cp313t-macosx_11_0_arm64.whl; pemja-0.6.1-cp313-cp313t-manylinux1_x86_64.whl; pemja-0.6.1-cp38-cp38-macosx_10_9_x86_64.whl; pemja-0.6.1-cp38-cp38-macosx_11_0_arm64.whl; pemja-0.6.1-cp38-cp38-manylinux1_x86_64.whl; pemja-0.6.1-cp39-cp39-macosx_10_9_x86_64.whl; pemja-0.6.1-cp39-cp39-macosx_11_0_arm64.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
py4jPy4J enables Python programs to dynamically…
permissive · top 1,000 on PyPI
java-access-bridge-wrapperWraps the Windows Java Access Bridge to let…
permissive · top 15,000 on PyPI
javaobj-py3Reads and writes Java objects serialized by…
permissive · top 5,000 on PyPI
pact-python-ffiProvides direct Python bindings to the Pact FFI…
permissive · top 5,000 on PyPI
jdk4pyBundles a JDK runtime into a Python package,…
copyleft · top 15,000 on PyPI
jpype1JPype provides Python access to Java classes…
permissive · top 1,000 on PyPI
powerfxProvides a Python bridge to invoke C# Power Fx…
permissive · top 15,000 on PyPI
pyobjcPyObjC bridges Python and Objective-C, enabling…
permissive · top 15,000 on PyPI
pyobjc-corePyObjC-core provides the foundational bridge…
permissive · top 5,000 on PyPI
JayDeBeApiJayDeBeApi bridges Python to Java JDBC database…
copyleft · top 5,000 on PyPI