Skip to main content

Python-Java bridge (ctypes/cffi-based PyJava)

Project description

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

jtypes.pyjava

A Python to Java bridge.

Overview

jtypes.pyjava is a bridge allowing to use Java classes in regular Python code.

PyPI record.

jtypes.pyjava is a lightweight Python package, based on the ctypes or cffi library.
It is an almost fully compliant implementation of Remi Rampin’s PyJava package by reimplementing whole its functionality in a clean Python instead of C/C++.

About PyJava:

Borrowed from the original website:

PyJava is a bridge allowing to use Java classes in regular Python code.
It is similar to JPype.

It is a C extension that uses JNI to access a Java virtual machine, meaning that it can be used anywhere Python is available. It is not a different interpreter like Jython and does not require anything, other than a JRE. The JVM dynamic library is load dynamically through pyjava.start() (some basic logic for locating this library on major platforms will be provided).

The integration with Java code is meant to be as complete as possible, allowing to use Java and Python objects seemlessly and converting objects back and forth when Java code is called. Furthermore, subclassing Java classes or interfaces in Python code to allow callback from Java is planned for the 0.2 version.

Please note that this extension is still at a very early stage of development and probably shouldn’t be used for anything.

Requirements

  • Either the Sun/Oracle JRE/JDK or OpenJDK.

Installation

Prerequisites:

To install run:

python -m pip install --upgrade jtypes.pyjava

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

python -m jt.pyjava.tests

Development

Visit development page

Installation from sources:

Clone the sources and run:

python -m pip install ./jtypes.pyjava

or on development mode:

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

Prerequisites:

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

    python -m pip install tox

License

Copyright (c) 2015-2018 Adam Karpierz

Licensed under the MIT License
Please refer to the accompanying LICENSE file.

Authors

Changelog

0.1.5a9 (2018-11-08)

  • Update of the required setuptools version.

  • Minor setup and tests improvements.

0.1.5a5 (2018-05-22)

  • Update of the required setuptools version.

0.1.5a4 (2018-02-26)

  • Improvement and simplification of setup and packaging.

0.1.5a3 (2018-01-29)

  • Development moved to github.

  • General improvements and update.

0.0.16a1 (2017-05-13)

0.0.15a2 (2017-01-03)

  • Next alpha releases.

0.0.10a1 (2016-09-24)

  • First alpha release.

0.0.1 (2015-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.pyjava-0.1.5a9.zip (50.4 kB view details)

Uploaded Source

File details

Details for the file jtypes.pyjava-0.1.5a9.zip.

File metadata

  • Download URL: jtypes.pyjava-0.1.5a9.zip
  • Upload date:
  • Size: 50.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for jtypes.pyjava-0.1.5a9.zip
Algorithm Hash digest
SHA256 606c76871a9caa78d757aafae5273a236f846b7d80c741ac951362374c20a0e9
MD5 33b21fe20479dd65aa06277cc6a97b8d
BLAKE2b-256 e8da040bdfd320d8a236816e5757679b65122530371db8499be9f657eba2938f

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