Pydantic V2 rewritten in Rust is 5-50x faster than Pydantic V1

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • msgspec

    A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML

  • Congratulations to the team, Pydantic is an amazing library.

    If you find JSON serialization/deserialization a bottleneck, another interesting library (with much less features) for Python is msgspec: https://github.com/jcrist/msgspec

  • shiv

    shiv is a command line utility for building fully self contained Python zipapps as outlined in PEP 441, but with all their dependencies included.

  • Try out shiv[1], it will package up your source and depndencies into a single file, though you still require the Python interpreter to run it on the target

    [1] https://github.com/linkedin/shiv

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • sdk-python

    Temporal Python SDK

  • > Unless Pydantic is downloading all OS binaries with the package and loading the right one at runtime, this would become a "problem" as well.

    Nah, it's not that bad. I built a Rust-backed Python library used by many [0], and with setuptools-rust (maturin wasn't flexible enough at the time) and cibuildwheel and GH actions, the wheels are built/shipped with the shared libraries embedded and the end user never has to worry or even be aware of its presence.

    Pydantic has already been shipping a binary mode with an option for pure Python, so maybe they'll keep the pure Python mode around.

    0 - https://github.com/temporalio/sdk-python

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts