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
Download the shortcut here.
Pyodide
JavaScript
library. This 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 loadPackage
currently doesn't work due to some unidentified bug or limitation in Shortcuts app.Download the shortcut here.