Skip to main content

Read and write Ruby-marshalled data.

Project description


Read and write Ruby-marshalled data.
Only basics Ruby data types can be read and written:

* `float`,
* `bool`,
* `int`,
* `str` (mapped to `unicode` in Python 2),
* `nil` (mapped to `None` in Python),
* `array` (mapped to `list`),
* `hash` (mapped to `dict`),
* symbols and other classes are mapped to specific Python classes.


pip install rubymarshal


from rubymarshal.reader import loads, load
from rubymarshal.writer import writes, write
with open('my_file', 'rb') as fd:
content = load(fd)
with open('my_file', 'wb') as fd:
write(fd, my_object)


Code is on github:
Documentation is on readthedocs:
Tests are on travis-ci:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
rubymarshal-1.0.3.tar.gz (9.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page