推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
mimzy
V2EX  ›  Python

pydantic V2 将核心功能拆解到使用 Rust 实现的 pydantic-core,目标带来 10 倍以上的性能提升

  •  3
     
  •   mimzy ·
    mookrs · Nov 3, 2022 · 4031 views
    This topic created in 1311 days ago, the information mentioned may be changed or developed.

    已经合并到 main 分支 https://github.com/pydantic/pydantic/pull/4516

    Benchmarks https://github.com/pydantic/pydantic-core/tree/main/tests/benchmarks

    一点感想:像 orjson 这种用 Rust 来写的 Python 库可能会越来越多了…

    8 replies    2024-08-07 16:48:32 +08:00
    junkun
        1
    junkun  
       Nov 3, 2022
    python 本来很多库,包括标准库,都是 c/c++写的。既然很多 c/c++的项目都被 rust 取代了,python 库自然也有很多会被 rust 取代。
    wzw
        2
    wzw  
       Nov 3, 2022 via iPhone
    期待正式发布
    vicalloy
        3
    vicalloy  
       Nov 3, 2022
    主要还是用 Python 来做算法实在是太慢了。
    janxin
        4
    janxin  
       Nov 3, 2022
    为什么不这么想:Python 作为胶水语言的第二春
    fcfangcc
        5
    fcfangcc  
       Nov 3, 2022   ❤️ 1
    为 pydantic_core 提过代码的路过- - rust+py 感觉可以通杀所有场景了
    alexsunxl
        6
    alexsunxl  
       Nov 3, 2022
    cool
    yyfearth
        7
    yyfearth  
       Nov 3, 2022
    另外 Rust + TS/JS 可以做全栈
    Rust 可以编译成 wasm 直接在浏览器里面跑
    服务器端 NodeJS 性能不够了可以和 Py 一样用 Rust 加速
    看下 deno 有没有可能取代 node
    shujuliuer
        8
    shujuliuer  
       Aug 7, 2024
    Pydantic 入门很简单,真抠细节时翻文档真着急。还好找到了一个中文文档 https://pydantic.com.cn/ ,是官方的吗,不太确定
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2904 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 14:16 · PVG 22:16 · LAX 07:16 · JFK 10:16
    ♥ Do have faith in what you're doing.