wadler-lindig
A Wadler–Lindig pretty-printer for Python.
Decision gist · record as of 2026-08-14
Yes. It is a lightweight, dependency-free tool with active maintenance and no known vulnerabilities. Install it if you need better-formatted object output than pprint in error messages, debug logs, or custom repr implementations. The Alpha status is not a blocker—the algorithm itself is well-established—but be aware the API may change in minor ways before 1.0.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python with zero runtime dependencies, distributed as a wheel.
- Active maintenance with recent commits and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — Apache License 2.0 (permissive): you can use, modify, and distribute this code freely in commercial and private projects, provided you include a copy of the license and note any changes you make.
last release 2025-06-18 (422 days) · last repo commit 2026-04-20 · 48 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,850,104 downloads/mo, #2,214 on PyPI
Alternatives
Verify before relying
pip install wadler_lindig
import wadler_lindig as wl
obj = {"key": [1, 2, 3], "nested": {"x": "value"}}
wl.pprint(obj, width=30)- Whether the library handles all standard Python types (e.g., sets, frozensets, custom iterables) beyond the documented examples.
- Performance characteristics when formatting very large or deeply nested structures.
- Stability of the API given the 'Alpha' development status (0.1.7 version).
What it is and what it does
Wadler–Lindig is a pretty-printer for Python objects that implements the Wadler–Lindig algorithm, a layout algorithm that breaks lines more intelligently than the built-in pprint module. Instead of pprint's right-aligned continuation style, it produces vertically compact output that respects a target width and indentation level. The library has zero dependencies and is implemented in pure Python.
It is designed for two main use cases: replacing pprint in error messages and debug output where horizontal space matters, and creating custom pretty-printed representations for complex types like nested dataclasses or other tree-like structures. You can customize formatting either by adding a `__pdoc__` method to your class or by passing a `custom` formatter to the pprint call. It also supports ANSI escape codes and provides concise summaries for NumPy arrays and similar types.
Use it for
- Format error messages and debug output that fit within terminal width constraints without excessive line wrapping.
- Create readable reprs for nested dataclasses or custom types by implementing the `__pdoc__` method.
- Display NumPy arrays in concise form (e.g., `f64[2,3](numpy)`) rather than full element dumps.
- Add ANSI escape codes to pretty-printed output for terminal-based debugging and logging.
- Replace pprint in test assertions or logging where output readability and compactness are both important.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
It is a lightweight, dependency-free tool with active maintenance and no known vulnerabilities. Install it if you need better-formatted object output than pprint in error messages, debug logs, or custom repr implementations. The Alpha status is not a blocker—the algorithm itself is well-established—but be aware the API may change in minor ways before 1.0.
Install
wadler-lindig on PyPI
Before you install
Low friction: pure Python with zero runtime dependencies, distributed as a wheel. Active maintenance with recent commits and no known vulnerabilities.
Requires Python 3.10 or later.
License in practice
Apache License 2.0 (permissive): you can use, modify, and distribute this code freely in commercial and private projects, provided you include a copy of the license and note any changes you make.
Quickstart
pip install wadler_lindig
import wadler_lindig as wl
obj = {"key": [1, 2, 3], "nested": {"x": "value"}}
wl.pprint(obj, width=30)
Verify before relying
- Whether the library handles all standard Python types (e.g., sets, frozensets, custom iterables) beyond the documented examples.
- Performance characteristics when formatting very large or deeply nested structures.
- Stability of the API given the 'Alpha' development status (0.1.7 version).
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 422 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,850,104 / month, #2,214 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3 |
Evidence: wadler_lindig-0.1.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “wadler lindig algorithm”
- wadler-lindigFormats Python objects for readable output using the Wadler–Lindig…
- munkresImplements the Munkres algorithm (Hungarian algorithm) to solve the…
- squarifyComputes treemap layout rectangles from a list of values using the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also pprintpp · prettyprinter · python-printr · paragraphs · pyink · gdbmongo · django-rich · treescope · art