Skip to main content

Rhodochrosite

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

Support and limitations

Rhodochrosite supports nearly every feature of the Marshal library, up to Ruby 4.0. Some parts are not supported:

  • The writer never outputs object links, so both self-referential structures and identity equality are broken. Outputting object links will likely never be supported (reading them is supported)
  • Ruby strings with custom encodings are not supported; any string that does not mark itself as UTF-8 will be treated as a bytestring.
  • The "d" type (Data) will never be supported, as it related to native Ruby extensions which don't really make sense across the wire barrier

Some features may be supported in the future, but are not currently supported:

  • Regular expression types; Ruby uses a different regexp execution engine to Python so these would not be very useful beyond being opaque types.
  • Hashes with default values,
  • Module references.
  • Struct instances.

However, some esoteric features that are otherwise annoying to support are supported:

  • Strings, arrays, and hashes with custom instance variables.
  • Hashes with duplicate keys (requires passing return_native_dicts=False)
  • Unicode symbol names

Basic usage

Use read_object to turn a marshal stream into a single high-level Python object:

print(read_object(b'\x04\b"\babc'))  # => "abc"

Use write_object to turn a Python object into a marshal stream:

print(write_object([1, 2, 3]))  # => b"\x04\b[\bi\x06i\ai\b"

Object mapping

This also comes with a recursive object mapper for turning Ruby user objects into Python objects (and back again).


Metadata

Release files for rhodochrosite 26.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rhodochrosite 26.0.0
File Size Uploaded Provenance Actions
rhodochrosite-26.0.0.tar.gz 36.6 kB Without provenance Details for rhodochrosite-26.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rhodochrosite 26.0.0
File Interpreter ABI Platform Actions
rhodochrosite-26.0.0-py3-none-any.whl Python 3 none any Details for rhodochrosite-26.0.0-py3-none-any.whl

Total release size: 86.5 kB

Release files / rhodochrosite-26.0.0.tar.gz

Download URL rhodochrosite-26.0.0.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
aee286c15700a8847bf70f39b04d3133a9974ac81b2a2a221d8a31e8bcb9c61e
BLAKE2b-256 checksum
How to use checksums
e9380e0a3f75a44f58ef03629e964374064cc04afaf968df1dc0ba9707e6ac92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / rhodochrosite-26.0.0-py3-none-any.whl

Download URL rhodochrosite-26.0.0-py3-none-any.whl
Size 49.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5780ce1fef3831c73c2fca6869b00369b0e3fcb68b58494a08bf167fcb71cd8b
BLAKE2b-256 checksum
How to use checksums
9fa53b9ce7cc0992b054d0c74211dad09224c7f10e4140a1292c40c99d4a077f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for rhodochrosite 26.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page