V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
D33109
V2EX  ›  Cloudflare

CF Workers 现在支持 Python 了

  •  1
     
  •   D33109 · 27 天前 · 1303 次点击


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

    - Python 标准库的大部分
    - 所有的绑定,包括 Workers AI 、Vectorize 、R2 、KV 、D1 、队列( Queues )、持久对象( Durable Objects )、服务绑定( Service Bindings )等等。
    - 环境变量和 Secrets
    - 一个强大的外部函数接口( FFI ),它允许你直接从 Python 使用 JavaScript 对象和函数 — 包括所有运行时 API
    - 内置包,包括 FastAPI 、Langchain 、httpx 等等。
    7 条回复    2024-04-03 21:01:29 +08:00
    Fish1024
        1
    Fish1024  
       27 天前
    好,这下不需要在 vercel 部署,再到 cf cname 域名了。
    Fish1024
        2
    Fish1024  
       27 天前
    哦,看了下还不行,目前还不支持 requirements.txt ,只能用内置包..
    Fish1024
        3
    Fish1024  
       27 天前
    目前支持的包 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
        4
    peterli427  
       27 天前
    活菩萨,太良心了
    julyclyde
        5
    julyclyde  
       27 天前
    foreign……感觉是用 js 写了个 python 引擎??
    SenLief
        6
    SenLief  
       27 天前
    @julyclyde pyodide ,把 cpython 移植 wasm vm 了?
    NewYear
        7
    NewYear  
       27 天前
    可惜不支持 .net
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   823 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 21:11 · PVG 05:11 · LAX 14:11 · JFK 17:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.