Our Python code block relies on Pyodide, a Python distribution that does not support the
However, the built-in
pyodide.http module provides two functions that can be used for network requests.
If we need to fetch some text data we should use
Next we will use a Text Viewer block to display the fetched text data.
If we want to fetch a binary object we should use
Next we will use an Image Box block to display the fetched binary object (a PNG image).