Skip to main content

Jep embeds CPython in Java

Project description

https://img.shields.io/pypi/pyversions/Jep.svg https://img.shields.io/pypi/l/Jep.svg https://img.shields.io/pypi/v/Jep.svg https://img.shields.io/pypi/dm/Jep.svg https://img.shields.io/badge/docs-wiki-orange.svg

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 runtime customizations and plugins that do not require a compilation step.

  • 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 requires that the JDK, Python, and optionally numpy are already installed.

Dependencies

  • Python >= 2.6

  • Java >= 1.6

  • Numpy (optional) >= 1.5 (numpy >= 1.7 recommended)

Running the jep script

The setup.py script will provide a jep or jep.bat script to make launching Jep easier. The jep script is very similar to running python from a terminal/command line. If run with an argument of a file path, it will run the script at that path. If run with no arguments, it will provide an interactive console that combines the Python language with access to Java classes on the classpath.

$ jep
>>> from java.lang import System
>>> System.out.println('hello, world')
hello, world
>>>

Help

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

Jep Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jep-3.3.5.tar.gz (188.9 kB view details)

Uploaded Source

File details

Details for the file jep-3.3.5.tar.gz.

File metadata

  • Download URL: jep-3.3.5.tar.gz
  • Upload date:
  • Size: 188.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jep-3.3.5.tar.gz
Algorithm Hash digest
SHA256 1d2b0344131b4d8cd60f3c879f81e59f3c559442cee23387e57e37010a048cfa
MD5 61bda250dbfa1fac5186d90b75df22ef
BLAKE2b-256 b99f0ef5f9dbeb795e4e1a2eca4d55adc9f469794fd1e686f509093efc2eecde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page