cheap-repr
Better version of repr/reprlib for short, cheap string representations.
Decision gist · record as of 2026-08-14
Yes, if you work with large or deeply nested data structures and want faster, more readable repr output. The package is stable, has no dependencies, and carries no security vulnerabilities. Maintenance is dormant but the code is mature; install it if your use case matches, but don't expect active feature development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Maintenance is dormant—last release was 2024-08-10 and no commits since then—but the repository remains active and the package is stable enough for production use if your needs haven't changed.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
last release 2024-08-10 (734 days) · last repo commit 2024-08-10 · 26 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 268,099 downloads/mo, #8,283 on PyPI
Alternatives
Verify before relying
from cheap_repr import cheap_repr
result = cheap_repr(list(range(100)))
print(result) # '[0, 1, 2, ..., 97, 98, 99]'- Whether pandas DataFrame and Series repr customization (max_rows, max_cols) works with current pandas versions
- Performance improvement magnitude compared to reprlib on large nested structures
What it is and what it does
cheap_repr is a drop-in replacement for Python's built-in repr() that produces shorter, faster string representations of objects. It truncates long outputs intelligently, handles nesting depth limits, and suppresses expensive repr computations for classes that produce very long strings. The library comes with built-in handlers for common types like lists, dicts, and strings, and lets you register custom repr functions for your own classes.
You use it by calling cheap_repr(obj) instead of repr(obj). It respects a configurable suppression threshold (default 300 characters) and max nesting level (default 3), making it useful in debugging, logging, and REPL contexts where repr output can become unwieldy. You can tune behavior globally or per-function, and it catches exceptions in repr functions to prevent crashes.
Use it for
- Debug logging of large data structures without truncating manually or waiting for slow repr computations
- REPL and interactive environments where long object representations clutter the output
- Custom repr registration for domain-specific types to control how they appear in logs and error messages
- Preventing performance issues in exception handlers or debuggers that call repr on many objects
- Nested data structure inspection where you want to limit depth and width of the output
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with large or deeply nested data structures and want faster, more readable repr output.
The package is stable, has no dependencies, and carries no security vulnerabilities. Maintenance is dormant but the code is mature; install it if your use case matches, but don't expect active feature development.
Install
cheap-repr on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2024-08-10 and no commits since then—but the repository remains active and the package is stable enough for production use if your needs haven't changed.
License in practice
MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions.
Quickstart
from cheap_repr import cheap_repr
result = cheap_repr(list(range(100)))
print(result) # '[0, 1, 2, ..., 97, 98, 99]'
Verify before relying
- Whether pandas DataFrame and Series repr customization (max_rows, max_cols) works with current pandas versions
- Performance improvement magnitude compared to reprlib on large nested structures
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 734 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 268,099 / month, #8,283 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: cheap_repr-0.5.2-py2.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 › “repr alternative”
- cheap-reprProvides short, fast, configurable string representations as an…
- renewGenerates reproducible string representations of Python objects that…
- fieldsGenerates lightweight container classes with automatic `__repr__`,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also renew · pprintpp · sqlalchemy-repr · jsonconversion · ptpython · fastnumbers · objectory · shortuuid · pampy · eerepr