Skip to content

ninia/jep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

24caee2 · Dec 15, 2024
Dec 2, 2021
Aug 3, 2024
Dec 16, 2023
Dec 14, 2024
Dec 2, 2021
Nov 24, 2023
Aug 10, 2021
Oct 26, 2022
Jul 13, 2018
Dec 15, 2024
Dec 16, 2023
Nov 24, 2024
Oct 22, 2024

Repository files navigation

Jep - Java Embedded Python

Jep embeds CPython in Java through JNI.

Some benefits of embedding CPython in a JVM:

  • Using the native Python interpreter may be much faster than alternatives.
  • Python is mature, well supported, and well documented.
  • Access to high quality Python modules, both native CPython extensions and Python-based.
  • Compilers and assorted Python tools are as mature as the language.
  • Python is an interpreted language, enabling scripting of established Java code without requiring recompilation.
  • Both Java and Python are cross platform, enabling deployment to different operating systems.

Installation

Simply run pip install --no-cache-dir --no-build-isolation jep or download the source and run pip install .. Building and installing require the JDK, Python, setuptools, and optionally numpy to be installed beforehand. The --no-cache-dir and --no-build-isolation options are not strictly required, however those settings enable Jep to make customizations for your environment such as enabling numpy specific behavior if numpy is installed.

Dependencies

  • Python >= 3.6
  • Java >= 1.8
  • NumPy >= 1.7 (optional)

Notable features

  • Interactive Jep console much like Python's interactive console
  • Supports multiple, simultaneous, mostly sandboxed sub-interpreters or shared interpreters
  • Numpy support for Java primitive arrays

Help

We welcome comments, contributions, bug reports, wiki documentation, etc.

If you need help, please first search for existing solutions online, in the the issues, and on the wiki. If you still need help, please open a GitHub issue and we will try and help you. Please remember to close the issue once it has been resolved.

Jep Team