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.1.tar.gz (28.2 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.1-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rhodochrosite-25.0.1.tar.gz
  • Upload date:
  • Size: 28.2 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.1.tar.gz
Algorithm Hash digest
SHA256 b2e7cfc99fb7836121e754eccd64fc572f06c039717c07fdfd58c3bad823c274
MD5 8238788094347d51a34e9b6615521706
BLAKE2b-256 45a0b573451ef494682f32bbd2a45f00f6493291c341b3ea89eb55b6e766bf8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rhodochrosite-25.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f375329d86866fc04ab755d5e823efa351ce2ea90c5d6cf45306fb701d25f14
MD5 b12e1cb91b08056c386edd36ee69765b
BLAKE2b-256 efb24327792fdf8b78770a290bc4de73893cb419905683041beeba4c58e49bce

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