finds.dev← search

// the find

agronholm/cbor2

★ 301 · Rust · MIT · updated Jul 2026

Python CBOR (de)serializer with extensive tag support

cbor2 is a Python CBOR serializer/deserializer (RFC 8949) with a Rust core for performance. It's for Python developers who need binary serialization faster or more space-efficient than JSON, particularly in IoT, embedded protocols, or anywhere you're paying per byte.

The Rust implementation gives it real performance headroom over pure-Python alternatives — the benchmarks directory exists and compares against JSON, which suggests the authors actually measured. Tag support is extensive: cyclic references, string deduplication via stringref, and the full IANA CBOR tag registry, not just the common subset. The API mirrors json/pickle so adoption friction is low. The CLI diagnostic tool (cbor2 --pretty) that converts binary CBOR to printable JSON is genuinely useful for debugging wire formats.

301 stars is low for a serialization library you'd stake production data on — this is a niche pick, not a community-validated one. The README contains an honest security disclaimer that it has not been tested against malicious input, which matters if you're deserializing from untrusted sources. The Rust rewrite is relatively recent, so the battle-tested history of the old pure-Python version doesn't fully carry over — you're also taking on a Rust toolchain as a build dependency on unsupported platforms. PyPy support is listed but requires PyPy 3.11+, narrowing the compatibility story.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →