Skip to content
Discussion options

You must be logged in to vote

Currently, Pyodide doesn't support httpx, so this custom transport layer would help with this issue and hopefully support other libraries on Pyodide that use httpx. Currently, joemarshall has come up with a way to support urllib3 in Pyodide (urllib3/urllib3#3195) which this solution relies on.

Testing environment: https://jupyter.org/try-jupyter/lab/

httpx fails on Pyodide:

import micropip

await micropip.install("ssl")
import ssl

await micropip.install("httpx", keep_going=True)
import httpx
client = httpx.Client()
client.get("https://swapi.dev/api/people/1")

Results in: ConnectError: [Errno 23] Host is unreachable

httpx working on Pyodide:

import micropip
await micropip.install("ssl")
i…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@lovelydinosaur
Comment options

@lovelydinosaur
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by psymbio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants