Cloudflare Python Workers 正式全面可用
Cloudflare Python Workers are now generally available
Cloudflare Python Workers are now generally available
Cloudflare Python Workers 现已正式推出
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".
经过两年的预览期,Cloudflare 在其服务端 Workers 平台上运行 Python 代码的支持现已稳定:"Python 现在已成为 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.
这其中的一个巧妙之处在于其工作原理。Cloudflare 在其基于 V8 的 workerd 运行时中,通过 Pyodide 将 Python 编译为 WebAssembly 来运行。
This comes with some limitations, documented here - most notably both multiprocessing and threading are non-functional in the WebAssembly VM.
这带来了一些限制,详见此处文档——最显著的是在 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.
其中特别有趣的一个细节是本地开发环境的体验——他们的 pywrangler 开发工具(在 PyPI 上令人困惑地打包为 workers-py)运行了其栈的完整本地模拟,包括在 V8 中的 WebAssembly 里使用 Pyodide 执行代码,这一切都包含在一个 123MB 的 workerd 二进制文件中,对我而言最终位于 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.
Python Workers 代表了 Cloudflare 对更广泛的 Python 生态系统的重要投入。发布公告归功于 Gyeongjae Choi、Dominik Picheta 和 Hood Chatham——Gyeongjae 和 Hood 都是 Pyodide 的核心维护者。
Via Hacker News
来源:Hacker News
Tags: python, cloudflare, webassembly, pyodide
标签:python, cloudflare, webassembly, pyodide
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力