High-performance embeddable Python 3 runtime
Embed Python in JVM Applications
import org.graalvm.polyglot.Context;
try (Context context = Context.newBuilder()
.allowAllAccess(true) // See documentation for options
.build()) {
context.eval("python", "print('Hello from GraalPy!')");
}- Use Python packages directly in Java, Kotlin, or Scala
- Upgrade Jython projects to Python 3
- Control permissions for Python code from full host access to fully sandboxed
- Script JVM applications with Python
Build and Run Python Applications
$ pyenv install graalpy-25.0.2
$ pyenv shell graalpy-25.0.2
$ python3 -c "import sys; print(sys.implementation.name)"
graalpy
$ python3 -m timeit "'-'.join(str(n) for n in range(100))"
500000 loops, best of 5: 757 nsec per loop- Speed up Python applications with the Graal JIT
- Compatible with many Python AI and data science packages
- Package Python applications as a single binary
- Use Java libraries in Python applications