skillfed

py-ubjson

Universal Binary JSON encoder/decoder

py-ubjson v0.16.1 1.5M downloads/30d#3,869 on PyPI45
Permissive license Apache License 2.0 DORMANT released

What it is and what it does

py-ubjson is an encoder and decoder for Universal Binary JSON, a compact binary serialization format defined by the UBJSON specification. It provides a Python API similar to the standard json module, with dump/load functions for file I/O and dumpb/loadb for bytes. The package includes an optional C extension that significantly accelerates encoding and decoding operations; you can check at runtime whether the compiled version is active via a boolean flag. It supports efficient binary encoding, nested structures, and typed containers according to the draft-12 specification.

The package has no runtime dependencies and can be installed with or without the C extension. It includes a command-line utility for converting between JSON and UBJSON formats. The implementation is stable (marked Production/Stable) but dormant, with the last release in April 2020 and minimal recent activity.

Use it for:

  • Serialize structured data to a compact binary format for efficient network transmission or storage.
  • Decode UBJSON data received from external systems or APIs that use the UBJSON standard.
  • Replace JSON in performance-critical applications where binary encoding overhead matters.
  • Convert between JSON and UBJSON formats via the command-line utility for data pipeline tasks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Encodes and decodes data in Universal Binary JSON format, a compact binary serialization standard, with optional C extension acceleration.

Yes, with conditions. The package is stable and permissively licensed, suitable for UBJSON serialization tasks. However, install friction is high due to optional C extension compilation, and dormant maintenance (last release 2020) means no recent bug fixes or Python version updates. Verify compatibility with your target Python version before adopting. Use it if you specifically need UBJSON support; for general binary serialization, consider actively maintained alternatives.

Install

py-ubjson on PyPI

pip

pip install py-ubjson

uv

uv add py-ubjson

poetry

poetry add py-ubjson

Installing py-ubjson

Before you install

High install friction: the package includes optional C extensions that require a compiler and build tools. The extension is not required but provides significant speed improvement. Package is dormant (last release 2020-04-18, last commit 2024-07-18) with no recent maintenance activity.

License in practice

Apache License 2.0 is permissive; you may use, modify, and distribute this package freely in commercial and private projects provided you include a copy of the license and state significant changes.

Quickstart

pip install py-ubjson

import ubjson

encoded = ubjson.dumpb({'a': 1})
decoded = ubjson.loadb(encoded)

Optional C extension requires a C compiler and build tools; set PYJSON_NO_EXTENSION=1 to skip compilation if needed.

Verify before relying

  • Whether the package works reliably with Python versions beyond 3.8 (classifiers list 3.8 as the latest, but current Python is much newer)
  • Current compatibility with modern C extension build systems and Python packaging standards
  • Whether the dormant status indicates unmaintained code or stable-enough-to-not-need-updates

Package facts

License Apache License 2.0 (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 2,309 days since the last release
Last repo commit
First released
Downloads 1,471,148/month — #3,869 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: py-ubjson-0.16.1.tar.gz

Keywords: ubjson, ubj

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

binary json encoder decoderubjson serializationcompact binary formatjson alternative formatefficient data serialization
serializationbinary-format

More Libraries packages