cbor2
CBOR (de)serializer with extensive tag support
Install
cbor2 on PyPI
pip
pip install cbor2uv
uv add cbor2poetry
poetry add cbor2Package 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
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:...
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
Similar packages
permissive · top 1,000 on PyPI
jaraco.functoolspermissive · top 1,000 on PyPI
pybase64permissive · top 1,000 on PyPI
webcolorspermissive · top 1,000 on PyPI
typeguardpermissive · top 1,000 on PyPI
websocketspermissive · top 100 on PyPI
anyiopermissive · top 100 on PyPI
kafka-pythonpermissive · top 1,000 on PyPI
identifypermissive · top 1,000 on PyPI
shortuuidpermissive · top 1,000 on PyPI