返回资讯中心
外部精选
ai-models
#LLM#工程实践#python#cloudflare#webassembly#pyodide

Cloudflare Python Workers are now generally available

Cloudflare Python Workers are now generally available After a two year preview, Cloudflare's support for running Python code in their server-side Workers platform is now stable: "Python is now a first-class, fully suppo…

Simon Willison3 分钟阅读

以下正文同步自 Simon Willison,版权归原站所有,已转换为易读排版。

Cloudflare Python Workers are now generally available

After a two year preview, Cloudflare's support for running Python code in their server-side Workers platform is now stable: "Python is now a first-class, fully supported language on the Cloudflare Developer Platform".

A neat thing about this is how it works. Cloudflare are running Python compiled to WebAssembly via Pyodide in their V8-based workerd runtime.

This comes with some limitations, documented here - most notably both multiprocessing and threading are non-functional in the WebAssembly VM.

One particularly interesting detail of this is the local development environment story - their pywrangler development tool (confusingly packaged as workers-py on PyPI) runs a full local simulation of their stack, including executing code with Pyodide in WebAssembly in V8 in a 123MB workerd binary, which for me ended up in node_modules/@cloudflare/workerd-darwin-arm64/bin/workerd.

Python Workers represent a significant investment in the wider Python ecosystem by Cloudflare. The release announcement is credited to Gyeongjae Choi, Dominik Picheta, and Hood Chatham - Gyeongjae and Hood are both Pyodide core maintainers.

Via Hacker News

Tags: python, cloudflare, webassembly, pyodide

正文由 FLUX 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。