jsonlines
Library with helpers for the jsonlines file format
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 jsonlinesuv
uv add jsonlinespoetry
poetry add jsonlinesInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ndjsonProvides a familiar JSON Lines (ndjson) parser…
copyleft · top 5,000 on PyPI
json-streamStreams JSON data from files, URLs, or…
permissive · top 5,000 on PyPI
jsonstreamsWrites JSON documents in a streaming format…
permissive · top 15,000 on PyPI
gronTransforms JSON into grep-able line-by-line…
permissive · top 15,000 on PyPI
jsonseqEncodes and decodes JSON text sequences…
permissive · top 15,000 on PyPI
bigquery-schema-generatorGenerates BigQuery table schemas from complete…
permissive · top 15,000 on PyPI
linear-tsvParses and writes tabular data in Linear TSV…
permissive · top 15,000 on PyPI
jsonaliasProvides a recursive type alias for…
permissive · top 5,000 on PyPI
tinybird-python-sdkIngest NDJSON data into Tinybird Data Sources…
unclear · top 15,000 on PyPI
writer-sdkPython client library for the Writer REST API,…
permissive · top 15,000 on PyPI