RAMP Packer

raw JSON →
2.5.17 verified Fri May 01 auth: no python

A tool for packing Redis modules into RAMP (Redis Advanced Module Packaging) format for distribution. Current version 2.5.17, supports Python 3.7+. Released as needed, follows semantic versioning.

pip install ramp-packer
error ModuleNotFoundError: No module named 'ramp_packer'
cause Using incorrect import path (ramp_packer instead of ramppacker).
fix
Use 'from ramppacker import RampPack'.
error AttributeError: 'RampPack' object has no attribute 'set_capabilities'
cause Trying to use a non-existent method, likely from an older API.
fix
Set capabilities via the dictionary property: pack.capabilities = {...}.
gotcha RAMP packages require specific directory structure. Ensure all referenced files exist and paths are correct.
fix Use absolute paths or ensure relative paths are correct relative to the working directory.
gotcha The 'capabilities' field must be a dict with lists; omitting or using wrong types will cause errors.
fix Define capabilities as {'types': [...], 'commands': [...], ...}.
deprecated Some older API functions may be deprecated in favor of the newer object-oriented RampPack class.
fix Update to use RampPack class instead of deprecated functions.
breaking Python 3.6 support was dropped; requires Python >=3.7.
fix Upgrade Python to 3.7 or later.

Creates a RAMP package from a compiled Redis module .so file.

from ramppacker import RampPack

pack = RampPack()
pack.name = 'my-module'
pack.version = '1.0.0'
pack.author = 'Your Name'
pack.email = 'your@email.com'
pack.description = 'A custom Redis module'
pack.capabilities = {'types': ['mytype'], 'commands': ['mycommand']}
pack.add_file('module.so')
pack.create('my-module.ramp')