RepositoryPythonAECác Tiểu Vương quốc Ả Rập Thống nhất
yukinarit

yukinarit/pyserde

Yet another serialization library on top of dataclasses, inspired by serde-rs.

854sao
71fork
18issue
2lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: serde

#1 Repository của tuần

1
TINIX TRENDING·Chủ đề: dataclasses

#1 Repository của tuần

2
TINIX TRENDING·Chủ đề: msgpack

#2 Repository của tuần

🚀 pyserde - Tuần tự hóa dataclasses mạnh mẽ, lấy cảm hứng từ serde-rs

pyserde biến dataclasses của bạn thành JSON, YAML, MsgPack... chỉ với một decorator.

pyserde là thư viện tuần tự hóa (serialization) trên nền tảng Python dataclasses, được cảm hứng bởi serde-rs của Rust. Thêm decorator @serde và chú thích kiểu dữ liệu theo PEP 484, bạn có thể dễ dàng chuyển đổi đối tượng Python sang và từ các định dạng như JSON, YAML, TOML, MsgPack, Pickle, dict, tuple...

✨ Điểm nổi bật

  • Hỗ trợ nhiều định dạng: dict, tuple, JSON, YAML, TOML, MsgPack, Pickle
  • Hỗ trợ kiểu dữ liệu đa dạng: primitives, containers (list, set, dict...), Optional, Union, Enum, Generic, ClassVar, InitVar...
  • Tích hợp sẵn thư viện chuẩn: pathlib.Path, decimal.Decimal, uuid.UUID, datetime, ipaddress
  • Hỗ trợ thư viện bên thứ ba: numpy (các kiểu dữ liệu), SQLAlchemy (thử nghiệm)
  • Tính năng nâng cao: Class Attributes, Field Attributes, Decorators, Type Check, Union Representation, Forward reference, PEP563, PEP585, PEP604, PEP681, PEP695
  • Dễ sử dụng: Chỉ cần @serde và chú thích kiểu, mọi thứ được tự động xử lý

💡 Vì sao đáng chú ý

pyserde không chỉ đơn thuần là một thư viện tuần tự hóa — nó mang trải nghiệm của serde-rs (một trong những thư viện tuần tĩnh mạnh nhất trong cộng đồng Rust) sang Python. Với sự hỗ trợ rộng rãi cho các kiểu dữ liệu phổ biến và tiêu chuẩn Python, cùng với việc tích hợp sẵn các tính năng như kiểu kiểm tra (type check), tham chiếu tiến (forward reference) và hỗ trợ cú pháp mới nhất của Python (PEP 604, PEP 695...), pyserde giúp bạn xử lý dữ liệu một cách mạnh mẽ và linh hoạt.

Phù hợp cho các dự án cần tuần tự hóa phức tạp, làm việc với nhiều định dạng dữ liệu, hoặc muốn áp dụng các tính năng tiên tiến từ serde-rs trong môi trường Python.


#Python #Serialization #Dataclasses #serde-rs #JSON #YAML #MsgPack #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
msgspec/msgspec

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

4.2k
Dec 1, 2026
RepositoryGo
urfave/cli

A declarative, simple, fast, and fun package for building command line tools in Go

24.3k
Nov 16, 2026
RepositoryRust
3Hren/msgpack-rust

MessagePack implementation for Rust / msgpack.org[Rust]

1.4k
Dec 23, 2025
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

290.9k
Nov 30, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

226.6k
Nov 13, 2026
RepositoryPython
Comfy-Org/ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

149.6k
Dec 2, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026