Chaquopy version 0.6.1

Posted on

This version adds the following features:

  • Apps can now use certain native packages, including NumPy (#14), as well as pure-Python packages which aren’t available from PyPI in wheel format.
  • Zero-initialized Java arrays can now be created in Python, by passing an integer to the array constructor rather than a sequence.

And fixes the following bugs:

Chaquopy version 0.5.0

Posted on

This version adds the following features:

And fixes the following bugs:

This version also increases the minimum API level for Chaquopy-based apps from 9 to 15. This is the default for new apps in Android Studio 3.0, and covers 99% of active devices.

Chaquopy version 0.4.0

Posted on

This version adds the ability to inherit Java classes and interfaces in Python classes. This means that Python objects can now be instantiated or accessed by non-Python-aware code, making it possible to write an Android app entirely in Python.

For more details, see the documentation. Or for a complete example, see the “Android UI demo” activity in the demo app.

Chaquopy version 0.3.0

Posted on

This version adds several conveniences to make using Java from Python more seamless:

  • The Java class hierarchy is now reflected in Python, so isinstance and issubclass now work correctly with Java classes and objects.
  • Java exceptions are now represented as objects of their actual type rather than a generic JavaException class. In conjunction with the previous point, this means that standard Python try ... except syntax can now be used to catch Java exceptions.
  • Python “unbound method” syntax is now supported for Java objects, e.g. ClassName.method(instance, args).

Chaquopy version 0.2.0

Posted on

The main improvements in this version are:

  • Java classes can now be imported into Python with the from ... import statement.
  • Nested classes can now be accessed as attributes of their containing class, using syntax identical to Java.

With these two features, direct use of the jclass function is now mostly unnecessary.

For more details, see the documentation.