Run Python code in Shortcuts app without relying on apps or APIs
Simple shortcut that let's you enter some Python code, then executes the code and displays the output. Makes use of the
Installing packages with
You can downlod the shortcut here.
Pyodide
JavaScript
library. This means means you need an internet connection the first time you run it, but since the library is cached (not sure for how long), it's possible to use offline too.Installing packages with
micropip
or loadPackages
currently doesn't work due to some unidentified bug or limitation in Shortcuts app.You can downlod the shortcut here.