skillfed

cbor2

CBOR (de)serializer with extensive tag support

cbor2 Permissive license MIT Active 304 v6.1.4 released

Install

cbor2 on PyPI

pip

pip install cbor2

uv

uv add cbor2

poetry

poetry add cbor2

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 12 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: cbor2-6.1.4-cp310-cp310-macosx_11_0_arm64.whl; cbor2-6.1.4-cp310-cp310-manylinux_2_28_aarch64.whl; cbor2-6.1.4-cp310-cp310-manylinux_2_28_x86_64.whl; cbor2-6.1.4-cp310-cp310-musllinux_1_2_aarch64.whl; cbor2-6.1.4-cp310-cp310-musllinux_1_2_x86_64.whl; cbor2-6.1.4-cp310-cp310-win32.whl; cbor2-6.1.4-cp310-cp310-win_amd64.whl; cbor2-6.1.4-cp310-cp310-win_arm64.whl; cbor2-6.1.4-cp311-cp311-macosx_11_0_arm64.whl; cbor2-6.1.4-cp311-cp311-manylinux_2_28_aarch64.whl; cbor2-6.1.4-cp311-cp311-manylinux_2_28_x86_64.whl; cbor2-6.1.4-cp311-cp311-musllinux_1_2_aarch64.whl; cbor2-6.1.4-cp311-cp311-musllinux_1_2_x86_64.whl; cbor2-6.1.4-cp311-cp311-win32.whl; cbor2-6.1.4-cp311-cp311-win_amd64.whl; cbor2-6.1.4-cp311-cp311-win_arm64.whl; cbor2-6.1.4-cp312-cp312-macosx_11_0_arm64.whl; cbor2-6.1.4-cp312-cp312-manylinux_2_28_aarch64.whl; cbor2-6.1.4-cp312-cp312-manylinux_2_28_x86_64.whl; cbor2-6.1.4-cp312-cp312-musllinux_1_2_aarch64.whl

Keywords: serialization, cbor

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Free Threading :: 2 - BetaProgramming Language :: RustTyping :: Typed

About cbor2

from the package's own PyPI description — quoted content, verbatim

.. image:: https://github.com/agronholm/cbor2/actions/workflows/test.yml/badge.svg :target: https://github.com/agronholm/cbor2/actions/workflows/test.yml :alt: Testing Status .. image:: https://github.com/agronholm/cbor2/actions/workflows/publish.yml/badge.svg :target: https://github.com/agronholm/cbor2/actions/workflows/publish.yml :alt: Publish Status .. image:: https://coveralls.io/repos/github/agronholm/cbor2/badge.svg?branch=master :target: https://coveralls.io/github/agronholm/cbor2?branch=master :alt: Code Coverage .. image:: https://readthedocs.org/projects/cbor2/badge/?version=latest :target: https://cbor2.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status .. image:: https://tidelift.com/badges/package/pypi/cbor2 :target: https://tidelift.com/subscription/pkg/pypi-cbor2 :alt: Tidelift

About

This library provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. The specification is fully compatible with the original RFC 7049. Read the docs <https://cbor2.readthedocs.io/> to learn more.

It is implemented in Rust.

.. _RFC 8949:...

Read as markdown · JSON record · Source repository · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

cbor2 encodes and decodes Concise Binary Object Representation (CBOR) data as defined in RFC 8949, offering a simple API similar to json or pickle with support for CBOR tags, shared value references, and extensible custom type handling.

Installation is straightforward via pip with prebuilt wheels for Python 3.10–3.15 across macOS, Linux, Windows, and ARM platforms. The package is actively maintained (last commit 2026-08-01, 12 days since release) with no runtime dependencies, though compiling from source requires Rust 1.93.0+ and Python ≥3.10.

cbor2 is released under the MIT license (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.

Usage

import cbor2

# Encode
data = {'hello': 'world'}
encoded = cbor2.dumps(data)

# Decode
decoded = cbor2.loads(encoded)

Python ≥3.10 is required; if installing on an unsupported platform without prebuilt wheels, the Rust toolchain must be available.

Verdict: cbor2 is a well-maintained, production-ready CBOR serialization library with zero security vulnerabilities, permissive MIT licensing, and broad platform coverage. Its Rust implementation and lack of dependencies make it reliable for data interchange, though users compiling from source will need a Rust toolchain.

Needs verification

  • Performance characteristics compared to alternative CBOR implementations or JSON serialization
  • Real-world adoption patterns and use cases beyond the documented examples
  • Compatibility guarantees for CBOR tag extensions across future versions
cbor serialization deserializationbinary object representation encodingrfc 8949 cbor formatcompact binary data formatcbor tag supportstructured data serializationbinary protocol encoding

Similar packages