Skip to content

Commit 3c19449

Browse files
committed
The donkey is an async donkey.
1 parent fe9ee68 commit 3c19449

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: docs/api.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -499,17 +499,17 @@ store = await storage("my-data-store", storage_class=MyStorage)
499499

500500
### `@pyscript/core/donkey`
501501

502-
Sometimes you need a Python worker ready and waiting to evaluate any code on
503-
your behalf. This is the concept behind the JavaScript "donkey". We couldn't
504-
think of a better way than "donkey" to describe something that is easy to
505-
understand and shoulders the burden without complaint. This feature
502+
Sometimes you need an asynchronous Python worker ready and waiting to evaluate
503+
any code on your behalf. This is the concept behind the JavaScript "donkey". We
504+
couldn't think of a better way than "donkey" to describe something that is easy
505+
to understand and shoulders the burden without complaint. This feature
506506
means you're able to use PyScript without resorting to specialised
507507
`<script type="py">` style tags. It's just vanilla JavaScript.
508508

509509
Simply `import { donkey } from '@pyscript/core/dist/core.js'` and automatically
510510
have both a *pyscript* module running on your page and a utility to bootstrap a
511-
terminal based worker to evaluate any Python code as and when needed in the
512-
future.
511+
terminal based worker to asynchronously evaluate any Python code as and when
512+
needed in the future.
513513

514514
```js title="A donkey worker"
515515
import { donkey } from '@pyscript/core/dist/core.js';
@@ -521,7 +521,7 @@ const {
521521
clear, // clear() the terminal
522522
reset, // reset() the terminal (including colors)
523523
kill, // kill() the worker forever
524-
} = donkey({
524+
} = await donkey({
525525
type: 'py' || 'mpy', // the Python interpreter to run
526526
persistent: false, // use `true` to track globals and locals
527527
terminal: '', // optionally set a target terminal container

0 commit comments

Comments
 (0)