Skip to main content

Java Embedded Python (ctypes/cffi-based Jep)

Project description

Currently only as placeholder (because a base package jtypes.jvm is still in development)

jtypes.jep

Java Embedded Python.

Overview

jtypes.jep embeds CPython in Java.

PyPI record.

jtypes.jep is a lightweight Python package, based on the ctypes or cffi library.
It is an almost fully compliant implementation of Mike Johnson’s Jep package by reimplementing its functionality in a clean Python instead of C.

About Jep:

Borrowed from the original website:

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.

Notable features

  • Interactive Jep console much like Python’s interactive console

  • Supports multiple, simultaneous, mostly sandboxed sub-interpreters

  • Numpy support for Java primitive arrays

Requirements

  • Java >= 1.7 - either the Sun/Oracle JRE/JDK or OpenJDK.

  • NumPy >= 1.7 (optional)

Installation

Prerequisites:

To install run:

python -m pip install --upgrade jtypes.jep

To ensure everything is running correctly you can run the tests using:

python -m jt.jep.tests

Development

Visit development page

Installation from sources:

Clone the sources and run:

python -m pip install ./jtypes.jep

or on development mode:

python -m pip install --editable ./jtypes.jep

Prerequisites:

  • Development is strictly based on tox. To install it run:

    python -m pip install tox

License

Copyright (c) 2014-2018 Adam Karpierz

Licensed under the zlib/libpng License
Please refer to the accompanying LICENSE file.

Authors

Changelog

3.8.2a2 (2018-11-08)

  • Synchro with pyjnius master branch.

  • Update of the required setuptools version.

  • Minor setup and tests improvements.

3.7.1b4 (2018-05-23)

  • Update of the required setuptools version.

  • Documentation update.

3.7.1b3 (2018-02-26)

  • Improvement and simplification of setup and packaging.

3.7.1b2 (2018-01-29)

  • Development moved to github.

  • General improvements and update.

3.7.1b1 (2017-01-01)

  • First beta release.

1.1.0b1 (2017-01-01)

  • First beta release.

1.1.0b1 (2017-01-01)

  • First beta release.

0.1.1 (2005-10-05)

  • Initial version.

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

jtypes.jep-3.8.2a2.zip (3.1 MB view details)

Uploaded Source

File details

Details for the file jtypes.jep-3.8.2a2.zip.

File metadata

  • Download URL: jtypes.jep-3.8.2a2.zip
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.2 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for jtypes.jep-3.8.2a2.zip
Algorithm Hash digest
SHA256 69c4c3e13fc09b7423c81086e344b1ff50ea163c17f64d469ce54d093e8bb837
MD5 ebbf721a1ace6b0881ff5248d5b3dc29
BLAKE2b-256 46b043a129f944ce37f81644762729ed043a7f014d9d385e0de9be62d7282d0b

See more details on using hashes here.

Supported by

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