Run Python code in Shortcuts app without depending 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 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 doen't work due to some unidentified bug or limitation in Shortcuts app. You can downlod the shortcut here .