skillfed

jsonlines

Library with helpers for the jsonlines file format

jsonlines v4.0.0 15.7M downloads/30d#1,176 on PyPI303
Permissive license BSD DORMANT released

What it is and what it does

jsonlines is a Python library that handles the jsonlines and ndjson file formats—both of which store JSON objects as newline-delimited records, one per line. It provides a simple, Pythonic interface to read and write these formats without manually parsing line-by-line JSON. The library depends only on attrs and requires Python 3.8 or later.

The package is stable and widely used (ranked in the top 5000 PyPI packages by downloads), but maintenance is dormant—the last release was in September 2023 and there have been no commits since August 2024. For straightforward jsonlines I/O tasks, this is a reliable, low-friction choice; for projects requiring active maintenance or frequent updates, the lack of recent activity is worth noting.

Use it for:

  • Parse log files or event streams stored in jsonlines format for analysis or transformation.
  • Write streaming JSON data to disk one record per line for efficient storage and incremental processing.
  • Convert between jsonlines and Python objects in data pipelines or ETL workflows.
  • Read large JSON datasets line-by-line without loading the entire file into memory.

Worth the install?

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

Simplifies reading and writing jsonlines (newline-delimited JSON) and ndjson format files, providing a lightweight interface for streaming JSON records.

Yes. The package is stable, production-grade, and has minimal install friction. Its single dependency and low complexity make it reliable for jsonlines I/O. The dormant maintenance status is not a blocker for basic use cases, but be aware that bug fixes or Python version compatibility updates are unlikely to be addressed quickly if issues arise.

Install

jsonlines on PyPI

pip

pip install jsonlines

uv

uv add jsonlines

poetry

poetry add jsonlines

Installing jsonlines

Before you install

Low friction install with a single lightweight dependency (attrs). Dormant maintenance status—last release was 2023-09-01 and no commits since 2024-08-05—but the package is marked Production/Stable and has remained functional without active development.

License in practice

BSD permissive license allows use in most commercial and open-source projects with minimal restrictions; you must retain the license notice in distributions.

Quickstart

pip install jsonlines

import jsonlines

with jsonlines.open('data.jsonl') as reader:
    for obj in reader:
        print(obj)

Requires Python 3.8 or later.

Verify before relying

  • Whether the dormant status (no commits since 2024-08-05) affects reliability for new Python versions or edge cases in production use.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — attrs
Maintenance dormant — 1,078 days since the last release
Last repo commit
First released
Downloads 15,689,783/month — #1,176 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jsonlines-4.0.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Internet :: Log AnalysisTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: LoggingTopic :: Utilities

Tags

jsonlines parserndjson reader writernewline delimited jsonstreaming json recordsjson lines formatline-by-line json processing
json-parsingstreaming-io

More Python Modules packages