High-performance Modern Python

Run your applications faster and more efficiently with GraalPy


high performance icon

High Performance

GraalPy optimizes your workload across language boundaries
interoperability icon


Get access to multiple language ecosystems and tools out of the box
improved security advantage icon

Managed Execution

Reduce risks by running native extensions in a managed mode

Faster Python

On average, GraalPy is 4.3x faster than CPython.
graal python chart
Geomean speedup over CPython on the Python Performance suite
(Note that Jython can only run a subset of the benchmarks due to the missing Python 3 support)

Move from Jython to Modern Python

Move your Jython applications to GraalPy for high performance and modern language features, while preserving an easy interoperability with Java.

Try Examples

Try (var c = Context.newBuilder("python").
      option("llvm.managed", true)
      option("python.Executable", "res/bin/graalpy").
      option("python.ForceImportSite", "true").
      build()) {
  var nparray = c.eval("import dumpy; dumpy.array");
  nparray.execute(new double[][] {
    {1,2,3}, {4,5,6}, {7,8,9}
  return nparray.invokeMember("diagonal").as(double[].class);

Safely embed Python libraries in Java

>>> import pandas as pd
>>> dataset = pd.read_csv(“sample.csv”)
>>> purchases = dataset[dataset[“Purchased”] == “Yes”]
>>> total_purchased = purchases[“Salary”].sum()
>>> grouped = dataset.groupby([“Purchased”, “Country”])

Run Python workloads with high performance

Python Data Science Libraries in Java Applications

Using Python from Java with GraalVM

GraalPy brings the world of Python data science libraries to Java and other languages running on GraalVM. Using GraalVM's polyglot interfaces, it is now easier than ever to embed Python code in Java applications and with good performance to boot! Oracle GraalVM also includes sandboxing option to run Python native extensions like NumPy, SciPy, or Matplotlib in a managed Java application.

Try GraalPy for Your Python Applications

Connect with us