You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</a> [![Join Slack][badge-slack]][slack][![GraalVM on Twitter][badge-twitter]][twitter][](#license)
6
6
7
-
GraalPy is a high-performance implementation of the [Python](https://www.python.org/) language for the JVM built on [GraalVM](https://www.graalvm.org/) technology.
7
+
GraalPy is a high-performance implementation of the [Python](https://www.python.org/) language for the JVM built on [GraalVM](https://www.graalvm.org/).
8
8
GraalPy has first-class support for embedding in Java and can turn Python applications into fast, standalone binaries.
9
9
10
10
## Why GraalPy?
11
11
12
-
**Low-overhead integration with Java and other languages.**
12
+
**Low-overhead integration with Java and other languages**
13
13
14
14
* Use [Python in Java](docs/user/Interoperability.md) applications on GraalVM JDK, Oracle JDK, or OpenJDK
15
15
* Use JVM tools like [Maven](docs/user/README.md), JFR, or [GraalVM Native Image](docs/user/Native-Images-with-Python.md)
@@ -20,19 +20,19 @@ GraalPy has first-class support for embedding in Java and can turn Python applic
20
20
* Install [packages](docs/user/Python-Runtime.md#installing-packages) like *NumPy*, *PyTorch*, or *Tensorflow*; run [Hugging Face](https://huggingface.co/) models like *Stable Diffusion* or *GPT*
21
21
* See if the packages you need work with our [Python Compatibility Checker](https://www.graalvm.org/python/compatibility/)
22
22
* Use almost any standard Python feature, the CPython tests run on every commit and pass ~85%
23
-
<sup>
23
+
<sup>
24
24
We run the tests of the [top PyPI packages](https://hugovk.github.io/top-pypi-packages/) on GraalPy every day.
25
25
For more than 96% of the top PyPI packages, there is at least one recent version that installs successfully and we are currently passing over 50% of all tests those top packages.
26
26
</sup>
27
27
28
28
**Runs Python code faster**
29
29
30
30
* Pure Python code is often faster than on CPython after JIT compilation
31
-
* C extension performance near CPython, but varies depending on the specific interactions of native and Python code
31
+
* C extension performance is near CPython, but varies depending on the specific interactions of native and Python code
32
32
* GraalPy is ~4x faster than CPython on the official [Python Performance Benchmark Suite](https://pyperformance.readthedocs.io/)
33
-
<sup>
33
+
<sup>
34
34
Benchmarks run via `pip install pyperformance && pyperformance run` on each of CPython and GraalPy.
35
-
Harness and benchmarks adapted by hand for Jython due to missing Python 3 support.
35
+
Harness and benchmarks were adapted by hand for Jython due to missing Python 3 support.
36
36
Each interpreter was installed via <tt>[pyenv](https://github.com/pyenv/pyenv)</tt>.
37
37
Geomean speedup was calculated against CPython on the intersection of benchmarks that run on all interpreters.
38
38
</sup>
@@ -81,12 +81,12 @@ Thanks to our integration with GraalVM Native Image, we can deploy Python applic
81
81
* Linux
82
82
83
83
The easiest way to install GraalPy on Linux is to use [Pyenv](https://github.com/pyenv/pyenv) (the Python version manager).
84
-
To install version 23.1.1 using Pyenv, run the following commands:
84
+
To install version 23.1.2 using Pyenv, run the following commands:
85
85
```bash
86
-
pyenv install graalpy-23.1.1
86
+
pyenv install graalpy-23.1.2
87
87
```
88
88
```bash
89
-
pyenv shell graalpy-23.1.1
89
+
pyenv shell graalpy-23.1.2
90
90
```
91
91
92
92
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
@@ -97,12 +97,12 @@ Thanks to our integration with GraalVM Native Image, we can deploy Python applic
97
97
* macOS
98
98
99
99
The easiest way to install GraalPy on macOS is to use [Pyenv](https://github.com/pyenv/pyenv) (the Python version manager).
100
-
To install version 23.1.1 using Pyenv, run the following commands:
100
+
To install version 23.1.2 using Pyenv, run the following commands:
101
101
```bash
102
-
pyenv install graalpy-23.1.1
102
+
pyenv install graalpy-23.1.2
103
103
```
104
104
```bash
105
-
pyenv shell graalpy-23.1.1
105
+
pyenv shell graalpy-23.1.2
106
106
```
107
107
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
108
108
@@ -113,7 +113,7 @@ Thanks to our integration with GraalVM Native Image, we can deploy Python applic
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-amd64/bin_ (or _graalpy-XX.Y.Z-macos-aarch64/bin_) directory.
119
119
@@ -143,7 +143,7 @@ The _setup-python_ action supports GraalPy:
143
143
144
144
Most existing Jython code that uses Java integration will be based on a stable Jython release—however, these are only available in Python 2.x versions.
145
145
To migrate your code from Python 2 to Python 3, follow [the official guide from the Python community](https://docs.python.org/3/howto/pyporting.html).
146
-
GraalPy also provides a [special mode](docs/user/Python-on-JVM.md) to facilitate migration.
146
+
GraalPy provides a [special mode](docs/user/Python-on-JVM.md) to facilitate migration.
147
147
To run Jython scripts, you need to use a GraalPy distribution running on the JVM so you can access Java classes from Python scripts.
148
148
149
149
* Linux
@@ -161,7 +161,7 @@ To run Jython scripts, you need to use a GraalPy distribution running on the JVM
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-jvm-XX.Y.Z-macos-amd64/bin_ (or _graalpy-jvm-XX.Y.Z-macos-aarch64/bin_) directory.
167
167
4. Run your scripts with `graalpy --python.EmulateJython`.
@@ -181,24 +181,24 @@ To run Jython scripts, you need to use a GraalPy distribution running on the JVM
181
181
182
182
## Documentation
183
183
184
-
Our [Quick Reference Sheet](https://www.graalvm.org/uploads/quick-references/GraalPy_v1/quick-reference-graalpy-v1(eu_a4).pdf) should help you get started.
184
+
[GraalPy Quick Reference Sheet](https://www.graalvm.org/uploads/quick-references/GraalPy_v1/quick-reference-graalpy-v1(eu_a4).pdf) should help you get started.
185
185
More GraalPy-specific user documentation is available in [docs/user](docs/user).
186
186
General documentation about [polyglot programming](https://www.graalvm.org/latest/reference-manual/polyglot-programming/) and [language embedding](https://www.graalvm.org/latest/reference-manual/embed-languages/) is available on the GraalVM website.
187
187
188
188
## Community
189
189
190
-
The best way to get in touch with us is to join the `#graalpy` channel on [GraalVM Slack][slack] or write to us on [Twitter][twitter]
190
+
The best way to get in touch with us is to join the `#graalpy` channel on [GraalVM Slack][slack] or [tweet us][twitter].
191
191
192
192
## Contributing
193
193
194
-
If you're thinking about contributing something to this repository, you will need to sign the [Oracle Contributor Agreement](https://www.graalvm.org/community/contributors/) for us to able to merge your work.
195
-
Please also take note of our [code of conduct](https://www.graalvm.org/community/conduct/) for contributors.
196
-
197
194
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md).
198
195
196
+
If you're thinking about contributing something to this repository, you will need to sign the [Oracle Contributor Agreement](https://www.graalvm.org/community/contributors/) for us to able to merge your work.
197
+
Also take a look at the [code of conduct](https://www.graalvm.org/community/conduct/) for contributors.
198
+
199
199
## Security
200
200
201
-
Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.
201
+
Consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.
GraalPy uses the state-of-the-art just-in-time (JIT) compiler of GraalVM.
15
14
When JIT compiled, GraalPy runs Python code ~4x faster than CPython on the official [Python Performance Benchmark Suite](https://pyperformance.readthedocs.io/).
16
-

15
+

17
16
18
17
These benchmarks can be run by installing the `pyperformance` package and calling `pyperformance run` on each of CPython and GraalPy.
19
18
To get the Jython numbers we adapted the harness and benchmarks because of missing Python 3 support in Jython.
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-amd64/bin_ (or _graalpy-XX.Y.Z-macos-aarch64/bin_) directory.
115
114
@@ -144,7 +143,7 @@ This generates wrapper scripts and makes the implementation usable from a shell
144
143
```
145
144
For example:
146
145
```bash
147
-
graalpy -m venv ~/.virtualenvs/graalpy-23.1.1
146
+
graalpy -m venv ~/.virtualenvs/graalpy-23.1.2
148
147
```
149
148
150
149
2. Activate the environment in your shell session:
@@ -153,7 +152,7 @@ This generates wrapper scripts and makes the implementation usable from a shell
153
152
```
154
153
For example:
155
154
```bash
156
-
source ~/.virtualenvs/graalpy-23.1.1/bin/activate
155
+
source ~/.virtualenvs/graalpy-23.1.2/bin/activate
157
156
```
158
157
159
158
Multiple executables are available in the virtual environment, including: `python`, `python3`, and `graalpy`.
Copy file name to clipboardExpand all lines: docs/user/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,8 +68,8 @@ The Java code and the _pom.xml_ file are heavily documented and the generated co
68
68
2. Open your project configuration file, _app/build.gradle_, and modify it as follows.
69
69
- Include the GraalPy support and the [GraalVM SDK Polyglot API](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html) in the `dependencies` section:
0 commit comments