Skip to content

Commit c7b564e

Browse files
committed
Revise website with Michael.
1 parent d14dbf8 commit c7b564e

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

docs/site/01-jvm-developers.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ audience_identifier: jvm
100100
{%- highlight java -%}
101101
import org.graalvm.polyglot.Context;
102102

103-
try (Context context = Context.newBuilder().allowAllAccess(true).build()) {
103+
try (Context context = Context.newBuilder()
104+
.allowAllAccess(true) // See documentation for options
105+
.build()) {
104106
context.eval("python", "print('Hello from GraalPy!')");
105107
}
106108
{%- endhighlight -%}
@@ -129,7 +131,9 @@ dependencies {
129131
{%- highlight java -%}
130132
import org.graalvm.polyglot.Context;
131133

132-
try (Context context = Context.newBuilder().allowAllAccess(true).build()) {
134+
try (Context context = Context.newBuilder()
135+
.allowAllAccess(true) // See documentation for options
136+
.build()) {
133137
context.eval("python", "print('Hello from GraalPy!')");
134138
}
135139
{%- endhighlight -%}

docs/site/01-python-developers.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,6 @@ docker run --rm ghcr.io/graalvm/graalpy-community:{{ site.language_version }} py
249249
<h3 id="guides" class="truffle__subtitle">Guides</h3>
250250
<div class="guides__row">
251251
<div class="guides__column">
252-
<div class="guides__card">
253-
<img src='{{ "/assets/img/downloads/miscellaneous-book.svg" | relative_url }}' alt="book icon">
254-
<a href="{{ '/jvm-developers/docs/#migrate-from-jython-to-graalpy' | relative_url }}">
255-
<div class="guides__topics">Migrate from Jython to GraalPy</div>
256-
</a>
257-
</div>
258252
<div class="guides__card">
259253
<img src='{{ "/assets/img/downloads/miscellaneous-book.svg" | relative_url }}' alt="book icon">
260254
<a href="https://github.com/graalvm/graal-languages-demos/blob/main/graalpy/graalpy-freeze-dependencies-guide/" target="_blank">
@@ -267,6 +261,12 @@ docker run --rm ghcr.io/graalvm/graalpy-community:{{ site.language_version }} py
267261
<div class="guides__topics">Choose the Right GraalPy Runtime Distribution</div>
268262
</a>
269263
</div>
264+
<div class="guides__card">
265+
<img src='{{ "/assets/img/downloads/miscellaneous-book.svg" | relative_url }}' alt="book icon">
266+
<a href="{{ '/python-developers/docs/#python-standalone-applications' | relative_url }}">
267+
<div class="guides__topics">Package Python as Standalone Applications</div>
268+
</a>
269+
</div>
270270
</div>
271271
<div class="guides__column">
272272
<div class="guides__card">
@@ -281,12 +281,6 @@ docker run --rm ghcr.io/graalvm/graalpy-community:{{ site.language_version }} py
281281
<div class="guides__topics">Manually Install Python Packages</div>
282282
</a>
283283
</div>
284-
<div class="guides__card">
285-
<img src='{{ "/assets/img/downloads/miscellaneous-book.svg" | relative_url }}' alt="book icon">
286-
<a href="{{ '/python-developers/docs/#python-standalone-applications' | relative_url }}">
287-
<div class="guides__topics">Package Python as Standalone Applications</div>
288-
</a>
289-
</div>
290284
</div>
291285
</div>
292286
</div>

docs/site/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ layout: base
2727
{%- highlight java -%}
2828
import org.graalvm.polyglot.Context;
2929

30-
try (Context context = Context.newBuilder().build()) {
30+
try (Context context = Context.newBuilder()
31+
.allowAllAccess(true) // See documentation for options
32+
.build()) {
3133
context.eval("python", "print('Hello from GraalPy!')");
3234
}
3335
{%- endhighlight -%}
3436
</div>
3537
<ul class="language__benefits-list">
3638
<li>Use Python packages directly in Java, Kotlin, or Scala</li>
3739
<li>Upgrade Jython projects to Python 3</li>
40+
<li>Control permissions for Python code from full host access to fully sandboxed</li>
3841
<li>Script JVM applications with Python</li>
3942
</ul>
4043
</div>
@@ -45,6 +48,7 @@ try (Context context = Context.newBuilder().build()) {
4548
{%- highlight bash -%}
4649
$ pyenv install graalpy-{{ site.language_version }}
4750
$ pyenv shell graalpy-{{ site.language_version }}
51+
4852
$ python3 -c "import sys; print(sys.implementation.name)"
4953
graalpy
5054
$ python3 -m timeit "'-'.join(str(n) for n in range(100))"
@@ -53,6 +57,7 @@ $ python3 -m timeit "'-'.join(str(n) for n in range(100))"
5357
</div>
5458
<ul class="language__benefits-list">
5559
<li>Speed up Python applications with the Graal JIT</li>
60+
<li>Compatible with many Python AI and data science packages</li>
5661
<li>Package Python applications as a single binary</li>
5762
<li>Use Java libraries in Python applications</li>
5863
</ul>

0 commit comments

Comments
 (0)