Skip to content

Commit 070b8d9

Browse files
committed
add badges
1 parent cec2dce commit 070b8d9

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

README.md

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# GraalPy, the GraalVM Implementation of Python
22

3+
[![](https://img.shields.io/badge/pyenv-graalpy-blue)](#start-replacing-cpython-with-graalpy)
4+
[![](https://img.shields.io/badge/maven-org.graalvm.polyglot/python-orange)](https://central.sonatype.com/artifact/org.graalvm.polyglot/python)
5+
</a> [![Join Slack][badge-slack]][slack] [![GraalVM on Twitter][badge-twitter]][twitter] [![License](https://img.shields.io/badge/license-UPL-green)](#license)
6+
37
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.
48
GraalPy has first-class support for embedding in Java and can turn Python applications into fast, standalone binaries.
59

6-
![](docs/showcase.png)<sup>
7-
[Java AWT app with Python graph library](https://github.com/timfel/graalpy-jbang) using [JBang](https://www.jbang.dev/)  |  [Standalone binary](https://github.com/timfel/racing-all-afternoon) of a Python game by [Joey Navarro](https://github.com/josephnavarro/racing-all-afternoon) with all dependencies included.
8-
</sup>
9-
1010
## Why GraalPy?
1111

1212
**Low-overhead integration with Java and other languages.**
1313

14-
* [Interoperate](docs/user/Interoperability.md) with Java, JavaScript, Ruby, and other languages on GraalVM JDK, Oracle JDK, or OpenJDK
14+
* Use [Python in Java](docs/user/Interoperability.md) applications on GraalVM JDK, Oracle JDK, or OpenJDK
1515
* Use JVM tools like [Maven](docs/user/PythonStandaloneBinaries.md#embedding-graalpy-in-a-java-application), JFR, or [GraalVM Native Image](docs/user/PythonNativeimages.md)
1616
* Manage Python libraries' system access thanks to GraalPy's [Java-based emulation of Python OS APIs](docs/user/OsInterface.md#java-backend)
1717

1818
**Compatible with the Python ecosystem**
1919

20-
* Use almost any standard Python feature, the CPython tests run on every commit and pass ~85%
2120
* Install [packages](https://pypi.org/) like *NumPy*, *PyTorch*, or *Tensorflow*; run [Hugging Face](https://huggingface.co/) models like *Stable Diffusion* or *GPT*
2221
* See if the packages you need work with our [Python Compatibility Checker](https://www.graalvm.org/python/compatibility/)
22+
* Use almost any standard Python feature, the CPython tests run on every commit and pass ~85%
2323
![](docs/mcd.svg)<sup>
2424
We run the tests of the [top PyPI packages](https://hugovk.github.io/top-pypi-packages/) on GraalPy every day.
2525
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.
@@ -40,7 +40,7 @@ Geomean speedup was calculated against CPython on the intersection of benchmarks
4040
## Getting Started
4141

4242
<details>
43-
<summary><strong>Embedding GraalPy in Java</strong></summary>
43+
<summary><strong><a name="start-embedding-graalpy-in-java"></a>Embedding GraalPy in Java</strong></summary>
4444

4545
GraalPy is [available on Maven Central](https://central.sonatype.com/artifact/org.graalvm.polyglot/python) for inclusion in Java projects.
4646
Refer to our [embedding documentation](https://www.graalvm.org/latest/reference-manual/embed-languages/) for more details.
@@ -69,7 +69,7 @@ Refer to our [embedding documentation](https://www.graalvm.org/latest/reference-
6969
</details>
7070

7171
<details>
72-
<summary><strong>Replacing CPython with GraalPy</strong></summary>
72+
<summary><strong><a name="start-replacing-cpython-with-graalpy"></a>Replacing CPython with GraalPy</strong></summary>
7373

7474
GraalPy should in many cases work as a drop-in replacement for CPython.
7575
You can use `pip` to install packages as usual.
@@ -126,20 +126,20 @@ Thanks to our integration with GraalVM Native Image, we can deploy Python applic
126126

127127
</details>
128128
<details>
129-
<summary><strong>Using GraalPy in Github Actions</strong></summary>
129+
<summary><strong><a name="start-using-graalpy-in-github-actions"></a>Using GraalPy in Github Actions</strong></summary>
130130

131131
The _setup-python_ action supports GraalPy:
132132

133-
```
133+
```yaml
134134
- name: Setup GraalPy
135-
uses: actions/setup-python@main
135+
uses: actions/setup-python@v5
136136
with:
137137
python-version: graalpy # or graalpy23.1 to pin a version
138138
```
139139

140140
</details>
141141
<details>
142-
<summary><strong>Migrating Jython Scripts to GraalPy</strong></summary>
142+
<summary><strong><a name="start-migrating-jython-scripts-to-graalpy"></a>Migrating Jython Scripts to GraalPy</strong></summary>
143143

144144
Most existing Jython code that uses Java integration will be based on a stable Jython release&mdash;however, these are only available in Python 2.x versions.
145145
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).
@@ -174,20 +174,25 @@ To run Jython scripts, you need to use a GraalPy distribution running on the JVM
174174

175175
</details>
176176

177+
### Examples
178+
![](docs/showcase.png)<sup>
179+
[Java AWT app with Python graph library](https://github.com/timfel/graalpy-jbang) using [JBang](https://www.jbang.dev/)  |  [Standalone binary](https://github.com/timfel/racing-all-afternoon) of a Python game by [Joey Navarro](https://github.com/josephnavarro/racing-all-afternoon) with all dependencies included.
180+
</sup>
181+
177182
## Documentation
178183

179184
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.
180185
More GraalPy-specific user documentation is available in [docs/user](docs/user).
181186
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.
182187

183-
## Contact
188+
## Community
184189

185-
The best way to get in touch with us is to join the `#graalpy` channel on [GraalVM Slack](https://www.graalvm.org/slack-invitation/).
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]
186191

187192
## Contributing
188193

189-
If you're thinking about contributing something to this repository, you will need to sign the [Oracle Contributor Agreement](http://www.graalvm.org/community/contributors/) for us to able to merge your work.
190-
Please also take note of our [code of conduct](http://www.graalvm.org/community/conduct/) for contributors.
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.
191196
192197
This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md).
193198
@@ -199,3 +204,8 @@ Please consult the [security guide](./SECURITY.md) for our responsible security
199204
200205
This GraalVM implementation of Python is Copyright (c) 2017, 2024 Oracle and/or its affiliates and is made available to you under the terms the Universal Permissive License v 1.0 as shown at [https://oss.oracle.com/licenses/upl/](https://oss.oracle.com/licenses/upl/).
201206
This implementation is in part derived from and contains additional code from 3rd parties, the copyrights and licensing of which is detailed in the [LICENSE](./LICENSE.txt) and [THIRD_PARTY_LICENSE](THIRD_PARTY_LICENSE.txt) files.
207+
208+
[badge-slack]: https://img.shields.io/badge/Slack-join-active?logo=slack
209+
[badge-twitter]: https://img.shields.io/badge/Twitter-@graalvm-active?logo=twitter
210+
[slack]: https://www.graalvm.org/slack-invitation/
211+
[twitter]: https://twitter.com/graalvm

0 commit comments

Comments
 (0)