skillfed

cbor

RFC 7049 - Concise Binary Object Representation

cbor v1.0.0 818.2K downloads/30d#4,982 on PyPI
Permissive license Apache Abandoned released

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 cbor

uv

uv add cbor

poetry

poetry add cbor

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: CProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Software Development :: Libraries :: Python Modules

Tags

CBOR serialization deserializationbinary object representationRFC 7049 implementationJSON alternative binary formatcompact data encodingfast binary serializationCBOR encoder decoder
serializationbinary-formatabandoned

More Python Modules packages