Skip to main content

Ruby marshal and unmarshal library

Project description

Rhodochrosite is a Python 3.13+ library for loading and saving objects in the Ruby marshal format.

Usage

Use rhodochrosite.read_object:

from rhodochrosite import read_object

print(read_object(b'\x04\b"\babc'))

For custom objects, use MarshalReader:

from rhodochrosite import MarshalReader, RubySymbol

data = MarshalReader.from_bytes(...)
data.object_factories[RubySymbol("MyType")] = _make_my_type
my_object = data.next_object()

Format support

Rhodochrosite supports all known features of Ruby’s Marshal format, up to Ruby 3.4. Object links are supported when reading, but not when writing; this has no practical affect other than some written files being larger than their input size.

Project details


Download files

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

Source Distribution

rhodochrosite-25.0.0.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rhodochrosite-25.0.0-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file rhodochrosite-25.0.0.tar.gz.

File metadata

  • Download URL: rhodochrosite-25.0.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.2 CPython/3.13.9 Linux/6.12.58-gentoo-dist

File hashes

Hashes for rhodochrosite-25.0.0.tar.gz
Algorithm Hash digest
SHA256 4e9cf0d4b55d2246007058f7d4d4a3dfda03db5453bfcf54caf8912327e926e1
MD5 80656e897ba89c5e436c7e2acbdb9324
BLAKE2b-256 3fddc701164f6f93996a1e2ea29e1ddb8613e7b4bd8247f8ff8e13a6b4648a89

See more details on using hashes here.

File details

Details for the file rhodochrosite-25.0.0-py3-none-any.whl.

File metadata

  • Download URL: rhodochrosite-25.0.0-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.2 CPython/3.13.9 Linux/6.12.58-gentoo-dist

File hashes

Hashes for rhodochrosite-25.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df9cdd646b612e756bbe4f43b32e8cced808e8fabf87c7ba5eea1df4d8e6d790
MD5 72802e2f963e6ea0bc183fe1b0d99a45
BLAKE2b-256 a65197caee71dd959ac593bcc12c45d7909f5a6901c7689b5d3287d9bb917cbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page