Pyodide, Emscripten, and PyScript ================================= From the Pyodide documentation, `Pyodide `_ is a Python distribution for the browser and Node.js based on WebAssembly and `Emscripten `_. This technology also underpins the `PyScript framework `_ and `Jupyterlite `_, so should work in those environments too. Starting in version 2.2.0 urllib3 supports being used in a Pyodide runtime utilizing the `JavaScript fetch API `_ or falling back on `XMLHttpRequest `_ if the fetch API isn't available (such as when cross-origin isolation isn't active). This means you can use Python libraries to make HTTP requests from your browser! Because urllib3's Emscripten support is API-compatible, this means that libraries that depend on urllib3 may now be usable from Emscripten and Pyodide environments, too. .. warning:: **Support for Emscripten and Pyodide is experimental**. Report all bugs to the `urllib3 issue tracker `_. Currently only supports browsers, does not yet support running in Node.js. It's recommended to `run Pyodide in a Web Worker `_ in order to take full advantage of features like the fetch API which enables streaming of HTTP response bodies. Getting started --------------- Using urllib3 with Pyodide means you need to `get started with Pyodide first `_. The Pyodide project provides a `useful online REPL `_ to try in your browser without any setup or installation to test out the code examples below. urllib3's Emscripten support is automatically enabled if ``sys.platform`` is ``"emscripten"``, so no setup is required beyond installation and importing the module. You can install urllib3 in a Pyodide environment using micropip. Try using the following code in a Pyodide console or ``