py-ubjson
Universal Binary JSON encoder/decoder
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-ubjsonuv
uv add py-ubjsonpoetry
poetry add py-ubjsonInstalling 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
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
simplejsonsimplejson encodes Python objects to JSON and…
permissive · top 1,000 on PyPI
risonEncodes and decodes data to and from Rison, a…
permissive · top 15,000 on PyPI
pyjson5Parses and serializes JSON5 (a more lenient…
permissive · top 5,000 on PyPI
prisonEncodes and decodes a compact URI-friendly data…
permissive · top 5,000 on PyPI
json-numpyProvides lossless JSON encoding and decoding…
permissive · top 15,000 on PyPI
mbstrdecoderDecodes multi-byte character strings by…
permissive · top 5,000 on PyPI
ubai-clientubai-client is a Python client for the…
unclear · top 15,000 on PyPI
bsonEncodes and decodes BSON (Binary JSON) data…
permissive · top 5,000 on PyPI
jsonseqEncodes and decodes JSON text sequences…
permissive · top 15,000 on PyPI
toon-formatEncodes and decodes data structures using TOON…
permissive · top 15,000 on PyPI