Embed Python in Java
C Java Python Other
Latest commit 44bb03c Jan 12, 2017 @ndjensen ndjensen Merge branch 'dev_3.6'
Permalink
Failed to load latest commit information.
commands
javadoc
jep increment version to 3.6.3 Jan 13, 2017
release_notes Add release note for shared modules. Aug 24, 2016
src better method picking with unicode objects Jan 11, 2017
tests Fix conversion of numpy ndarrays to java primitive arrays. Oct 10, 2016
.gitignore Merge branch 'develop' Jun 6, 2012
AUTHORS update release notes and AUTHORS Jul 5, 2016
CONTRIBUTING.md Update CONTRIBUTING to reflect current workflow. Jun 30, 2016
LICENSE remove dead files Aug 25, 2016
MANIFEST.in fix issue #44 include jep.bat in sdist Apr 14, 2016
README.rst remove extraneous delete local ref Aug 23, 2016
setup.py add 3.5 to list of supported Python versions Feb 29, 2016

README.rst

Jep - Java Embedded Python

Jep embeds CPython in Java through JNI and is safe to use in a heavily threaded environment.

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 jep or download the source and run python setup.py build install. Building and installing require the JDK, Python, and optionally numpy to be installed beforehand.

Dependencies

  • Python 2.6, 2.7, 3.2, 3.3, 3.4, or 3.5
  • Java >= 1.6
  • Numpy (optional) >= 1.5 (numpy >= 1.7 recommended)

Notable features

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

Help

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

Jep Team