Replies: 1 comment 2 replies
-
If your packages are pure python packages, you can add your package into
unzip python_stdlib.zip -d python_stdlib
mkdir python_stdlib/mymodule
echo "def myfunc():" > python_stdlib/mymodule/run.py
echo " print('Hello from mymodule.myfunc()')" >> python_stdlib/mymodule/run.py
cd python_stdlib && zip -r python_stdlib_patched.zip . && mv python_stdlib_patched.zip ../ && cd ..
rm -rf python_stdlib import { loadPyodide } from 'pyodide'
async function main() {
const pyodide = await loadPyodide({ stdLibURL: "./python_stdlib_patched.zip" })
pyodide.runPython(`
import mymodule.run
mymodule.run.myfunc()
`)
}
main() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a use case where my app will be in the internal network without access to the internet. I want to bundle a couple of python packages like tinyHtml. How do I achieve that? Where should I add the wheels? I use pyodide NPM package.
Beta Was this translation helpful? Give feedback.
All reactions