diff --git a/docs/api.md b/docs/api.md index 6e4c71a..e5dceb3 100644 --- a/docs/api.md +++ b/docs/api.md @@ -417,6 +417,42 @@ store = await storage("my-data-store", storage_class=MyStorage) # The store object is now an instance of MyStorage. ``` +### `@pyscript/core/donkey` + +Sometimes you need a Python worker ready and waiting to evaluate any code on +your behalf. This is the concept behind the JavaScript "donkey". We couldn't +think of a better way than "donkey" to describe something that is easy to +understand and shoulders the burden without complaint. This feature +means you're able to use PyScript without resorting to specialised +` + + @@ -168,8 +168,8 @@ In the end, our HTML should look like this: 🦜 Polyglot - Piratical PyScript - - + +

Polyglot 🦜 💬 🇬🇧 ➡️ 🏴‍☠️

diff --git a/docs/user-guide/first-steps.md b/docs/user-guide/first-steps.md index 871ec72..44b8f66 100644 --- a/docs/user-guide/first-steps.md +++ b/docs/user-guide/first-steps.md @@ -20,9 +20,9 @@ CSS: - + - + diff --git a/docs/user-guide/plugins.md b/docs/user-guide/plugins.md index e0d05bd..493af3a 100644 --- a/docs/user-guide/plugins.md +++ b/docs/user-guide/plugins.md @@ -100,7 +100,7 @@ For example, this will work because all references are contained within the registered function: ```js -import { hooks } from "https://pyscript.net/releases/2024.9.2/core.js"; +import { hooks } from "https://pyscript.net/releases/2024.10.1/core.js"; hooks.worker.onReady.add(() => { // NOT suggested, just an example! @@ -114,7 +114,7 @@ hooks.worker.onReady.add(() => { However, due to the outer reference to the variable `i`, this will fail: ```js -import { hooks } from "https://pyscript.net/releases/2024.9.2/core.js"; +import { hooks } from "https://pyscript.net/releases/2024.10.1/core.js"; // NO NO NO NO NO! ☠️ let i = 0; @@ -147,7 +147,7 @@ the page. ```js title="log.js - a plugin that simply logs to the console." // import the hooks from PyScript first... -import { hooks } from "https://pyscript.net/releases/2024.9.2/core.js"; +import { hooks } from "https://pyscript.net/releases/2024.10.1/core.js"; // The `hooks.main` attribute defines plugins that run on the main thread. hooks.main.onReady.add((wrap, element) => { @@ -197,8 +197,8 @@ hooks.worker.onAfterRun.add(() => { - - + + + PyWorker - mpy bootstrapping pyodide example diff --git a/version.json b/version.json index a0867df..1c15121 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "2024.9.2" + "version": "2024.10.1" }