skillfed

python-rapidjson

Python wrapper around rapidjson

python-rapidjson v1.23 4.9M downloads/30d#2,191 on PyPI533
Permissive license MIT License Active released

What it is and what it does

python-rapidjson is a Python wrapper around RapidJSON, a C++ JSON parser and serialization library. It exposes fast JSON encoding and decoding for bytes, strings, and file-like objects, plus JSON Schema validation capabilities. The module is designed to be mostly compatible with Python's standard json module while prioritizing performance.

The package supports both functional and class-based APIs. It includes a Decoder class that can parse relaxed JSON syntax (JSONC with comments and trailing commas), and an Encoder class for customized serialization. It has no runtime dependencies and is actively maintained with wheels pre-built for multiple Python versions and architectures.

Use it for:

  • Replace json module in performance-critical applications that serialize/deserialize large JSON payloads frequently
  • Parse JSON with comments (JSONC) or trailing commas in configuration files or development workflows
  • Validate incoming JSON data against JSON Schema before processing in web services or APIs
  • Stream large JSON documents to file-like objects with configurable chunk sizes
  • Serialize Python objects to JSON in data pipelines where speed matters

Worth the install?

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

Fast JSON serialization and deserialization with JSON Schema validation, wrapping the C++ RapidJSON library into a Python 3 extension that handles bytes, strings, and file-like objects.

Yes. python-rapidjson is actively maintained, has no known vulnerabilities, supports current Python versions (3.9–3.14), and offers genuine performance benefits over the standard library for JSON-heavy workloads. The MIT license is permissive. Medium install friction (compiled extension) is mitigated by pre-built wheels for most platforms. Install if you need faster JSON handling or JSONC support; skip if standard json performance is adequate.

Install

python-rapidjson on PyPI

pip

pip install python-rapidjson

uv

uv add python-rapidjson

poetry

poetry add python-rapidjson

Installing python-rapidjson

Before you install

Medium install friction due to compiled C++ extension requiring platform-specific wheels, but wheels are pre-built for Python 3.9–3.14 across macOS, Linux (including ARM and ppc64le), and Windows, reducing build complexity for most users.

License in practice

MIT License permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.

Quickstart

pip install python-rapidjson

import rapidjson
data = {'foo': 100, 'bar': 'baz'}
print(rapidjson.dumps(data))
print(rapidjson.loads('{"bar":"baz","foo":100}'))

Verify before relying

  • Exact performance gains versus standard library json module and other third-party JSON libraries
  • Whether JSON Schema validation supports all draft versions or specific subsets
  • Memory overhead or constraints when processing very large JSON documents

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.6)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 250 days since the last release
Last repo commit
First released
Downloads 4,949,031/month — #2,191 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_rapidjson-1.23-cp310-cp310-macosx_10_9_x86_64.whl; python_rapidjson-1.23-cp310-cp310-macosx_11_0_arm64.whl; python_rapidjson-1.23-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_rapidjson-1.23-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl; python_rapidjson-1.23-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_rapidjson-1.23-cp310-cp310-musllinux_1_2_aarch64.whl; python_rapidjson-1.23-cp310-cp310-musllinux_1_2_ppc64le.whl; python_rapidjson-1.23-cp310-cp310-musllinux_1_2_x86_64.whl; python_rapidjson-1.23-cp310-cp310-win32.whl; python_rapidjson-1.23-cp310-cp310-win_amd64.whl; python_rapidjson-1.23-cp311-cp311-macosx_10_9_x86_64.whl; python_rapidjson-1.23-cp311-cp311-macosx_11_0_arm64.whl; python_rapidjson-1.23-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; python_rapidjson-1.23-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl; python_rapidjson-1.23-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; python_rapidjson-1.23-cp311-cp311-musllinux_1_2_aarch64.whl; python_rapidjson-1.23-cp311-cp311-musllinux_1_2_ppc64le.whl; python_rapidjson-1.23-cp311-cp311-musllinux_1_2_x86_64.whl; python_rapidjson-1.23-cp311-cp311-win32.whl; python_rapidjson-1.23-cp311-cp311-win_amd64.whl

Keywords: json, jsonc, rapidjson

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

fast json parsing pythonrapidjson python wrapperjson serialization deserializationjson schema validationhigh performance json libraryjsonc parser pythonjson with comments support
json-parsingperformance-criticalc-extension

More Software Development packages