3 ms·
> transpiles them from Python to JavaScript There are projects that do that, but it looks like PyScript instead runs Python code directly. It uses a Python int
by pansa2 2y ago
> transpiles them from Python to JavaScript
There are projects that do that, but it looks like PyScript instead runs Python code directly. It uses a Python interpreter compiled to WebAssembly - either CPython (from Pyodide) or MicroPython.
- deleted 2y ago[deleted]
- deisteve 2y agodoes this mean we can install FastAPI in the browser?
- bouncing 2y agoI mean, maybe, but you'd have trouble with sandboxing when you try to open a socket.
- deisteve 2y agohow would i go about doing that? open up a socket via webrtc to the internet and translate incoming webrtc calls to HTTP for fastapi
- nine_k 2y agoWhat would be the point? You can't have a listening socket anyway. And if the browser has to imitate the connection, there are numerous less oblique ways than running fastAPI.
- maartenbreddels 2y agoYes, with pycafe that is possible: https://py.cafe/snippet/asgi/v1#c=H4sIABN3wGYAA41UTW_bMAz9K4Z2aYFEs52vxoCBfWBDdxt2WA91D4pFx8IcSZOYtkaQ_z4yTtYVa5FGp0c-8j3SUnaidhpEIZrgNkmjIipvErPxLmDyleDH798qq7xPyhO8uKwsnw8UlWvAi0q8rwQFVextnWhokuAcXlwWlU3oFwC3wSa7SmwgRrWGShRJJa6h61xy40KnK7EXIxHg99YE2IDFSIbISegAESp7tEUc7D2bVXHNiAz8NPAgikZ1EUYCtMEvVq064mDYUsT32DpLFb532mgY36cyn8uMijvVuy2KYifuIUTDrJxMkPMfjlruTlqB0EjUrel0ACLd_s2gWkVASj4Yja0oslk6EhtjbwY4GdA1mHVLOgyN5k2bDj5R1wjhs7OojIXwigJTx6uBSxSvuK8Q-7v96H8Xr1h8quPv5XvxvPYp_e_-JT7ic5k3rOH86MdRzo19mvjlOdtj12wxe4smQqCw6s6Jnnisymc_OqyfruLtHd0WV_9iyF1oQcR_l7QqtkUyuZqv6umknsyXq8Vsms1gmYPOm6Weq6VK08pGa5rGuLLM5ERm9E5sz2gqp5Kzp3telqmcXMm8sm2WMcgO-RbR1y5QOpOpnA2BR87nC84fH8ehIMu5v--9ohtt12VJetzQaKsYLCpbQ0DTED1P86nMOUsLIPIYHmkyfgiRvWWkxlatQ4Wgx7wlSqRyznHfa2XR1NRGHlzQp9l6dK4jznwpZ4OPgTQe7JO3Kw47TzKx43no0B_JEaTcR-z_APpsUxySBAAA https://py.cafe/snippet/asgi/v1#c=H4sIABN3wGYAA41UTW_bMAz9K4...