Create a Falcon demonstration in Pyodide #2320
Labels
community
documentation
needs contributor
Comment on this issue if you'd like to volunteer to work on this. Thanks!
Milestone
Although installing a web framework in the browser is really a pointless and futile exercise, we could maybe still create a demo showcasing the test client? 🤔
In any case, I tried installing Falcon in Pyodide REPL just for fun, and hit quite many roadblocks.
micropip
picks only Falcon 2.0, because in the 3.x series we have no universal wheel. This will be addressed as part of the 4.0 release, where we ship one. I could specify the 4.0dev2 wheel by URL from TestPyPI.AssertionError: wsgi.errors (<pyodide.console._WriteStream object at 0x15653e8>) doesn't have the attribute writelines
. Not sure if it is something we should address, or we could file a bug upstream. ⬅️ Filed assys.stderr
has no attributewritelines
pyodide/pyodide#5053 for now.async_to_sync(...)
doesn't work from inside a loop:RuntimeError: Runner.run() cannot be called from a running event loop
. The Pyodide REPL seems to run the equivalent ofpython -m asyncio
. ⬅️ Filed asfalcon.async_to_sync()
does not work inside an async loop #2321.ASGIConductor
works out of the box though!(With Cibuildwheel, we could also prepare a binary Pyodide wheel for 3.13, but I think optimizing performance in this scenario is pretty much moot.)
One could take a look if it is easy to embed that REPL script with our code snippets preseeded, ideally with a selector to test different examples and/or tutorials.
The text was updated successfully, but these errors were encountered: