--- id: ndjson version: "0.3.1" license: GNU General Public License v3 license_treatment: copyleft maintenance: abandoned --- # ndjson — JsonDecoder for ndjson License: copyleft · Maintenance: abandoned · Downloads: 1.7M/mo ## What it is and what it does ndjson is a lightweight, dependency-free library for reading and writing JSON Lines (newline-delimited JSON) files. It mirrors the familiar interface of Python's built-in json and pickle modules, offering both high-level functions (load, loads, dump, dumps) and lower-level streaming classes (reader, writer, JSONEncoder, JSONDecoder) for flexible integration with other libraries like requests. The package is small, has no external dependencies, and includes tests. However, it has been abandoned since early 2020 with no active maintenance, so it will not receive bug fixes or updates for compatibility with newer Python versions or JSON specifications. Use it for: - Parse streaming JSON Lines data from APIs or log files without loading entire datasets into memory - Convert between ndjson text format and Python objects using a json-like interface - Integrate ndjson parsing into requests-based HTTP clients via the JSONDecoder class - Write Python objects to ndjson files with csv-like reader/writer classes for batch processing - Handle newline-delimited JSON in data pipelines where each line is a separate JSON object ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a familiar JSON Lines (ndjson) parser and writer with an API matching Python's built-in json and pickle modules, supporting streaming and file I/O for newline-delimited JSON data. Yes, if you need ndjson support in a stable, mature codebase targeting Python 2.7 or 3.5–3.7 and do not require ongoing maintenance. The package is simple, dependency-free, and has no known vulnerabilities. No, if you require active maintenance, support for modern Python versions, or need assurance of future compatibility—consider alternatives or vendor the code directly. ## Install pip install ndjson uv add ndjson poetry add ndjson ## Installing ndjson Before you install: No runtime dependencies and a pure-Python wheel make installation frictionless. However, the package is abandoned—last release was 2020-02-25 and last commit 2022-12-26—so no maintenance or security updates should be expected. License in practice: Licensed under GNU General Public License v3 (copyleft). Any derivative work or modification must be distributed under the same license; proprietary or closed-source projects should review compatibility before use. Quickstart: import ndjson # Load from file with open('data.ndjson') as f: data = ndjson.load(f) # Convert to/from text text = ndjson.dumps(data) data = ndjson.loads(text) Verify before relying: - Whether the package works reliably with modern Python versions (classifiers list only up to 3.7; requires_python is unspecified) - Whether there are known incompatibilities or edge cases in ndjson parsing that the fact sheet does not surface ## Package facts - License: GNU General Public License v3 (copyleft) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ndjson parser, json lines reader writer, newline delimited json, streaming json, ndjson file handling, json encoder decoder, csv-like json reader, json-lines, streaming-data, abandoned [View on SkillFed](https://skillfed.io/packages/ndjson) · [View on PyPI](https://pypi.org/project/ndjson/)