cbor
RFC 7049 - Concise Binary Object Representation
What it is and what it does
cbor is a Python implementation of RFC 7049, the CBOR binary serialization standard. It provides two main functions—cbor.loads() and cbor.dumps()—to convert Python objects to and from CBOR's compact binary format. The package includes both a C implementation and a pure Python implementation.
CBOR is designed as a binary alternative to JSON: it supports JSON's data types plus additional structures, serializes to smaller payloads, and parses faster. The package is useful when you need efficient binary interchange with systems that speak CBOR, or when payload size and parsing speed matter more than human readability.
Use it for:
- Serialize structured data for transmission over bandwidth-constrained or latency-sensitive networks
- Implement CBOR support in applications that must interoperate with IoT or embedded systems using RFC 7049
- Store compact binary representations of Python objects in databases or files where size efficiency is important
- Build APIs or protocols that require binary encoding with JSON-like flexibility
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Serializes and deserializes data in CBOR (Concise Binary Object Representation) format, a binary encoding standard comparable to JSON but with smaller output and faster parsing.
No—unless you have a specific requirement to work with existing CBOR data or systems. The package is abandoned (last release 2016-02-09) with no active maintenance. High installation friction combined with zero active maintenance makes this a poor choice for new projects.
Install
cbor on PyPI
pip
pip install cboruv
uv add cborpoetry
poetry add cborInstalling cbor
Before you install
Installation requires compilation of C extensions (high friction). The package is abandoned—last release was 2016-02-09, with no active maintenance or repository activity visible. Use only if you have specific compatibility needs with existing CBOR data.
License in practice
Licensed under Apache (permissive), allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical use.
Quickstart
import cbor
data = {'key': 'value'}
encoded = cbor.dumps(data)
decoded = cbor.loads(encoded)
Requires a C compiler and development headers to build the C extension during installation.
Verify before relying
- Whether the C implementation still provides claimed 3-5× speedup over modern JSON libraries
- Compatibility with Python versions beyond 3.5 (classifiers list only 2.7, 3.4, 3.5)
- Whether the pure-Python fallback works reliably if C compilation fails
- Active maintained alternatives and their relative performance
Package facts
| License | Apache (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,839 days since the last release |
| First released | |
| Downloads | 818,221/month — #4,982 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cbor-1.0.0.tar.gz
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
cbor2Encodes and decodes CBOR (Concise Binary Object…
permissive · top 1,000 on PyPI
zcborzcbor validates and converts YAML/JSON/CBOR…
permissive · top 15,000 on PyPI
prisonEncodes and decodes a compact URI-friendly data…
permissive · top 5,000 on PyPI
paradictParadict serializes and deserializes Python…
permissive · top 15,000 on PyPI
borsh-constructImplements the Borsh binary serialization…
permissive · top 15,000 on PyPI
pyiso8583Serializes and deserializes ISO8583 financial…
permissive · top 15,000 on PyPI
rfc8785Implements RFC 8785 (JSON Canonicalization…
permissive · top 5,000 on PyPI
jcsCanonicalizes JSON according to RFC 8785,…
permissive · top 5,000 on PyPI
avro-python3Serializes and deserializes data in Apache Avro…
permissive · top 5,000 on PyPI
risonEncodes and decodes data to and from Rison, a…
permissive · top 15,000 on PyPI