skillfed

renew

Gives a reproducible manner to your objects and can serialize them in 100% pythonic format.

renew v0.5.4 141.2K downloads/30d#11,247 on PyPI
Permissive license MIT license Abandoned released

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 renew

uv

uv add renew

poetry

poetry add renew

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: PyPyTopic :: Software DevelopmentTopic :: Software Development :: Code Generators

Tags

reproducible object reprserialize objects to pythoneval-safe object representationpython object pickling alternativestore class state as code
serializationrepr-basedabandoned

More Software Development packages