Skip to main content

A Python to Java bridge (ctypes/cffi-based PyJava).

Project description

jtypes.pyjava

A Python to Java bridge.

Overview

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

PyPI record.

Documentation.

jtypes.pyjava is an almost fully compliant implementation of Remi Rampin’s PyJava package by reimplementing whole its functionality in a clean Python instead of C.
jtypes.pyjava package is closely based on the jvm and jni Python packages.

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

Development

Prerequisites:

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

    python -m pip install --upgrade tox

Visit development page.

Installation from sources:

clone the sources:

git clone https://github.com/karpierz/jtypes.pyjava.git jtypes.pyjava

and run:

python -m pip install ./jtypes.pyjava

or on development mode:

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

License

Copyright (c) 2016-2022 Adam Karpierz
Licensed under the MIT License
Please refer to the accompanying LICENSE file.

Authors

Changelog

0.1.5b6 (2022-01-29)

  • Drop support for Python 3.6.

  • Setup update.

0.1.5b5 (2021-10-16)

  • dll_path argument of JVM() can also be type os.PathLike.

  • Copyright year update.

  • Setup update.

0.1.5b2 (2020-11-10)

  • Fix for exception handling in start(…).

  • Add support for Python 3.8 and 3.9.

  • Drop support for Python2.

  • General update, improvements and cleanup.

  • Setup update.

0.1.5a10 (2019-07-10)

  • Last release for Python2.

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 (2016-01-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.5b6.zip (67.2 kB view details)

Uploaded Source

Built Distribution

jtypes.pyjava-0.1.5b6-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jtypes.pyjava-0.1.5b6.zip
  • Upload date:
  • Size: 67.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for jtypes.pyjava-0.1.5b6.zip
Algorithm Hash digest
SHA256 09d31c0f7e1b73d342cb77d3c486be49c48fed062c5b4513bff8be4150589315
MD5 a5f5763c124bbd7246659f8f0809f264
BLAKE2b-256 5adb02de9273d5bad034ad607b6cd7b7588b835cf411e0ba0b58527180ce8527

See more details on using hashes here.

File details

Details for the file jtypes.pyjava-0.1.5b6-py3-none-any.whl.

File metadata

  • Download URL: jtypes.pyjava-0.1.5b6-py3-none-any.whl
  • Upload date:
  • Size: 35.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for jtypes.pyjava-0.1.5b6-py3-none-any.whl
Algorithm Hash digest
SHA256 a29588538ce74caf8da70b60c917d8ee0334d4dbfaf2d691f9e2c01763091eee
MD5 1e13d1bc814095f881ee968bf4f2b99e
BLAKE2b-256 64c2bf828b88c015572a76d512e591d8e6dd4311b752312779b38925f40bdfe2

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