Patching a pure python package that uses requests


I’d like to import a pure python package within pyscript, but it uses the requests library, which isn’t supported in emscripten. Is there any way to patch that package so that I can import it within pyscript?

We haven’t yet figured this story out. PyScript has access the the browser’s native HTTP fetch mechanism, and we could make a requests-like interface over that, but your package wouldn’t know about this. Also, in the browser, all requests are limited by CORS, so enabling HTTP isn’t enough. We are actively considering options here.