sandboxedjs 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -633,8 +633,15 @@ Those use dynamic imports, so they only fail if you call them.
633
633
 
634
634
  ### Python in a browser
635
635
 
636
- Node resolves Pyodide from the installed package. A browser cannot resolve it by name, so tell it
637
- where the module and the assets are a CDN is fine:
636
+ Python works lazily in a browser without extra configuration. On first use,
637
+ SandboxedJS loads the matching Pyodide runtime and assets from jsDelivr:
638
+
639
+ ```ts
640
+ const box = await createContainer();
641
+ await box.exec("python3 -c 'import sqlite3; print(sqlite3.sqlite_version)'");
642
+ ```
643
+
644
+ To self-host Pyodide or use another trusted CDN, override both URLs:
638
645
 
639
646
  ```ts
640
647
  import { configurePython, createContainer } from "sandboxedjs";
@@ -648,8 +655,8 @@ const box = await createContainer();
648
655
  await box.exec("python3 -c 'import sqlite3; print(sqlite3.sqlite_version)'");
649
656
  ```
650
657
 
651
- Without that configuration, a browser with no package resolver cannot locate
652
- Pyodide. Python never falls back to a host interpreter or another runtime.
658
+ Python never falls back to a host interpreter or another runtime. A custom
659
+ Pyodide module and its asset directory must use the same Pyodide version.
653
660
 
654
661
  ## Uploading files
655
662