Our great sponsors
-
msgspec
A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML
-
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.
-
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.
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
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
> 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
Related posts
- pyserde: Serialization library on top of dataclasses, inspired by serde-rs
- Need help developing a high performance Redis ORM for Python
- Pyserde: Serialization library on top of dataclasses, inspired by serde-rs
- Blog post: Writing Python like it’s Rust
- Show HN: Msgspec, a fast serialization/validation library for Python