CF Workers 现在支持 Python 了

48 天前
 D33109


Cloudflare Workers 为 Python 提供了一流的支持,包括以下内容的支持:

- Python 标准库的大部分
- 所有的绑定,包括 Workers AI 、Vectorize 、R2 、KV 、D1 、队列( Queues )、持久对象( Durable Objects )、服务绑定( Service Bindings )等等。
- 环境变量和 Secrets
- 一个强大的外部函数接口( FFI ),它允许你直接从 Python 使用 JavaScript 对象和函数 — 包括所有运行时 API
- 内置包,包括 FastAPI 、Langchain 、httpx 等等。
1471 次点击
所在节点    Cloudflare
7 条回复
Fish1024
48 天前
好,这下不需要在 vercel 部署,再到 cf cname 域名了。
Fish1024
48 天前
哦,看了下还不行,目前还不支持 requirements.txt ,只能用内置包..
Fish1024
48 天前
目前支持的包 https://developers.cloudflare.com/workers/languages/python/packages
---
aiohttp: 3.9.3
aiohttp-tests: 3.9.3
aiosignal: 1.3.1
annotated-types: 0.6.0
annotated-types-tests: 0.6.0
anyio: 4.2.0
async-timeout: 4.0.3
attrs: 23.2.0
certifi: 2024.2.2
charset-normalizer: 3.3.2
distro: 1.9.0
fastapi: 0.110.0
frozenlist: 1.4.1
h11: 0.14.0
h11-tests: 0.14.0
hashlib: 1.0.0
httpcore: 1.0.4
httpx: 0.27.0
idna: 3.6
jsonpatch: 1.33
jsonpointer: 2.4
langchain: 0.1.8
langchain-core: 0.1.25
langchain-openai: 0.0.6
langsmith: 0.1.5
lzma: 1.0.0
micropip: 0.6.0
multidict: 6.0.5
numpy: 1.26.4
numpy-tests: 1.26.4
openai: 1.12.0
openssl: 1.1.1n
packaging: 23.2
pydantic: 2.6.1
pydantic-core: 2.16.2
pydecimal: 1.0.0
---
pydoc-data: 1.0.0
pyyaml: 6.0.1
regex: 2023.12.25
regex-tests: 2023.12.25
requests: 2.31.0
six: 1.16.0
sniffio: 1.3.0
sniffio-tests: 1.3.0
sqlite3: 1.0.0
ssl: 1.0.0
starlette: 0.36.3
-----------
peterli427
48 天前
活菩萨,太良心了
julyclyde
48 天前
foreign……感觉是用 js 写了个 python 引擎??
SenLief
48 天前
@julyclyde pyodide ,把 cpython 移植 wasm vm 了?
NewYear
48 天前
可惜不支持 .net

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1029531

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX