python-json-logger
JSON Log Formatter for the Python Logging Package
Install
python-json-logger on PyPI
pip
pip install python-json-loggeruv
uv add python-json-loggerpoetry
poetry add python-json-loggerPackage facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 137 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: python_json_logger-4.1.0-py3-none-any.whl
About python-json-logger
from the package's own PyPI description — quoted content, verbatim
PyPi (image) PyPI - Status (image) PyPI - Downloads (image) Python Versions (image) License (image) Build Status (image)
Python JSON Logger
Python JSON Logger enables you produce JSON logs when using Python's logging package.
JSON logs are machine readable allowing for much easier parsing and ingestion into log aggregation tools.
Documentation
- Documentation
- Quickstart Guide
- [Change...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Produces machine-readable JSON logs using Python's standard logging package, enabling easier parsing and ingestion into log aggregation tools.
Clean install with no runtime dependencies and low friction. Actively maintained as of March 2026 with recent activity; supports Python 3.10–3.14.
BSD-2-Clause is permissive and poses no restrictions on commercial or private use; you may use, modify, and distribute with minimal obligations.
Usage
pip install python-json-logger
import logging
from python_json_logger import jsonlogger
logger = logging.getLogger()
logger.addHandler(logging.StreamHandler())
logger.handlers[0].setFormatter(jsonlogger.JsonFormatter())
logger.info('message', extra={'key': 'value'})
Requires Python 3.10 or later.
Verdict: Mature, actively maintained JSON logging formatter with zero dependencies, permissive licensing, and no known vulnerabilities. Well-suited for production log aggregation pipelines where structured output is required.
Needs verification
- Whether the package handles edge cases in JSON serialization of complex logging objects.
- Performance characteristics when logging at high volume or with large payloads.
Similar packages
permissive · top 1,000 on PyPI
llama-cloud-servicespermissive · top 1,000 on PyPI
glompermissive · top 1,000 on PyPI
sqlparsepermissive · top 1,000 on PyPI
logurupermissive · top 1,000 on PyPI
einopspermissive · top 1,000 on PyPI
alabasterpermissive · top 1,000 on PyPI
h2permissive · top 1,000 on PyPI
distropermissive · top 1,000 on PyPI
colorlogpermissive · top 1,000 on PyPI