renew
Gives a reproducible manner to your objects and can serialize them in 100% pythonic format.
What it is and what it does
Renew is a serialization library that makes Python objects produce eval-safe repr strings—strings that, when passed to eval(), recreate equivalent objects. Unlike pickle, which produces binary data, renew generates pure Python code that can be read, edited, and imported as a module. You define a class inheriting from renew.Mold, ensure its __init__ arguments are stored as same-named attributes, and renew automatically generates a reproducible __repr__. You can then call renew.serialize() to write object graphs to a Python file with proper imports and formatting.
The main constraint is structural: your class must store constructor arguments as attributes with matching names, and variadic/keyword arguments must be stored in specific container types (tuple, list, set, OrderedDict for args; dict or OrderedDict for kwargs). This design trades flexibility for transparency—the resulting code is human-readable and can serve as a lightweight alternative to pickle for scenarios where you want to inspect or manually edit serialized state.
Use it for:
- Store application configuration or cached object state as importable Python files instead of binary formats.
- Serialize test fixtures or example data in a format that's both machine-readable and human-editable.
- Debug object hierarchies by inspecting their eval-safe repr output before deciding whether to persist them.
- Generate Python code that reconstructs complex object graphs without requiring pickle at load time.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates reproducible string representations of Python objects that can be eval'd back into equivalent instances, and serializes object graphs to importable Python files.
No. The package is abandoned (last release 2019-06-03) with no ongoing maintenance. While it has no known vulnerabilities and low install friction, the lack of updates means it will not receive bug fixes or compatibility patches for newer Python versions. For new projects, consider maintained alternatives.
Install
renew on PyPI
pip
pip install renewuv
uv add renewpoetry
poetry add renewInstalling renew
Before you install
Low friction installation with a single dependency (six). However, the package is abandoned—last release was 2019-06-03 with no subsequent maintenance or updates.
License in practice
MIT license (permissive). You can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
import renew
class MyClass(renew.Mold):
def __init__(self, a, b):
self.a, self.b = a, b
obj = MyClass(1, 2)
print(repr(obj)) # MyClass(1, 2)
renew.serialize('/tmp/out.py', obj=obj)
Class must store all constructor arguments as instance attributes with identical names; variadic args must be stored as list/tuple/set/OrderedDict, keyword args as dict/OrderedDict.
Verify before relying
- Whether the package works reliably with Python versions beyond 3.7 (latest tested version in classifiers).
- Whether nested object serialization handles circular references or deep graphs without issues.
- Real-world performance on large object graphs or complex class hierarchies.
Package facts
| License | MIT license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — six |
| Maintenance | abandoned — 2,629 days since the last release |
| First released | |
| Downloads | 141,200/month — #11,247 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: renew-0.5.4-py2.py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cheap-reprProvides short, fast, configurable string…
permissive · top 15,000 on PyPI
serpentSerpent serializes Python objects to…
permissive · top 15,000 on PyPI
sliceratorSlicerator wraps a class's `__getitem__` method…
permissive · top 15,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
cobbleCobble is a Python library for creating data…
permissive · top 5,000 on PyPI
desertDesert generates marshmallow serialization…
permissive · top 15,000 on PyPI
sqlalchemy-reprAdds automatic, human-readable repr() output to…
unclear · top 15,000 on PyPI
tblibSerializes exceptions and tracebacks to pickle…
permissive · top 1,000 on PyPI
re-assertProvides a helper class for regex assertions…
permissive · top 15,000 on PyPI
magicattrProvides nested attribute access and…
permissive · top 5,000 on PyPI