--- id: pemja version: "0.6.1" license: https://www.apache.org/licenses/LICENSE-2.0 license_treatment: permissive maintenance: aging --- # pemja — PemJa License: permissive · Maintenance: aging · Downloads: 227.2K/mo ## 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 above — 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 pip install pemja uv add pemja poetry add pemja ## Installing 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_current - Install friction: medium - Maintenance: aging - Downloads: 227.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python java interop, call java from python, python java bridge, cross language ffi, java python integration, invoke java methods python, embedded python interpreter, polyglot, ffi-bridge, java-interop [View on SkillFed](https://skillfed.io/packages/pemja) · [View on PyPI](https://pypi.org/project/pemja/)