Skip to main content

MRRC: A fast MARC library written in Rust with Python bindings

Project description

MRRC: MARC Rust Crate

Tests Lint Build codecov CodSpeed

A Rust library for reading, writing, and manipulating MARC bibliographic records, with Python bindings.

Note: This project was developed using agentic coding tools (amp and Claude) and uses beads for agentic issue tracking. The package has not yet had extensive practical testing by humans and should be considered experimental.

Features

  • Reads and writes ISO 2709 (MARC21) binary format
  • Python bindings with pymarc-compatible API (minor differences documented)
  • Multiple serialization formats: JSON, XML, MARCJSON, CSV, Protobuf, Arrow, and others
  • MARC-8 and UTF-8 character encoding support
  • Benchmarked at ~4x pymarc throughput in Python, ~1M records/sec in Rust

Installation

Python (3.10+):

pip install mrrc
# or with uv:
uv add mrrc

Rust:

cargo add mrrc

For optional formats in Rust:

cargo add mrrc --features format-arrow,format-protobuf

Example

Python:

from mrrc import MARCReader

# Pass filename directly for best performance (releases GIL)
for record in MARCReader("records.mrc"):
    print(record.title())

File paths use pure Rust I/O, releasing Python's GIL for multi-threaded workloads. See the threading guide for details.

Rust:

use mrrc::MarcReader;
use std::fs::File;

let file = File::open("records.mrc")?;
let mut reader = MarcReader::new(file);
while let Some(record) = reader.read_record()? {
    if let Some(title) = record.title() {
        println!("{}", title);
    }
}

Documentation

Format Support

Format Read Write Python Rust
ISO 2709 Yes Yes built-in built-in
JSON Yes Yes built-in built-in
MARCJSON Yes Yes built-in built-in
XML Yes Yes built-in built-in
CSV - Yes built-in built-in
Protobuf Yes Yes built-in format-protobuf
Arrow Yes Yes built-in format-arrow
FlatBuffers Yes Yes built-in format-flatbuffers
MessagePack Yes Yes built-in format-messagepack
BIBFRAME Yes Yes built-in format-bibframe

Python wheels include all formats. Rust requires feature flags for optional formats.

Full format matrix

Platforms

Pre-built Python wheels are available for:

Platform Architectures
Linux x86_64, aarch64
macOS x86_64 (Intel), arm64 (Apple Silicon)
Windows x64

Status

Experimental. The Python API aims for pymarc compatibility but has some differences; see the migration guide. Rust APIs may change between minor versions.

Roadmap

Version 0.7.0 is suitable for testing but remains experimental. Before a 1.0 release, we plan to complete:

  1. Real-world data testing — Validate against large-scale MARC datasets from LOC, Internet Archive, and other sources to discover edge cases
  2. Code review — Thorough review of the codebase, particularly the Rust core and PyO3 bindings
  3. Performance analysis — Profile with production workloads, optimize bottlenecks, and update benchmark documentation

License

MIT

Links

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mrrc-0.7.0-cp314-cp314-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.14Windows x86-64

mrrc-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

mrrc-0.7.0-cp314-cp314-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

mrrc-0.7.0-cp313-cp313-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.13Windows x86-64

mrrc-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

mrrc-0.7.0-cp313-cp313-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

mrrc-0.7.0-cp312-cp312-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.12Windows x86-64

mrrc-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mrrc-0.7.0-cp312-cp312-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mrrc-0.7.0-cp311-cp311-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.11Windows x86-64

mrrc-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mrrc-0.7.0-cp311-cp311-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mrrc-0.7.0-cp310-cp310-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10Windows x86-64

mrrc-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mrrc-0.7.0-cp310-cp310-macosx_11_0_arm64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file mrrc-0.7.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mrrc-0.7.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 30c0bc1f86918c3a4ed063e5227e0441ebd7124b9690e1bd8afdaff216fadc18
MD5 bd108daebae9dda2bbd9c397ebb2e4d9
BLAKE2b-256 b8f90423febb75852f76b428cebe8626743e6e3d5f9d90e607e26587f64cce1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp314-cp314-win_amd64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 caded227b9ed7631f4e157d9b7fa4bc42d204165211e54d75eba28b6480b6637
MD5 94d525da0cbb16aa40a7fb748e2b2ccd
BLAKE2b-256 dff1fa0597fbe9f30a5c4bf4b54da87d69f8da9843ea3327349d89c1a6ce72ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 703e2897cc205f4e03e178cacc8054eba4a035b40a220cce36898f22f4da6acb
MD5 8fdb020763fdd01bde8525908b449265
BLAKE2b-256 0524efaf8ad165c3a6c04085b3aec755f59976f7f515ff83350f7908d45f69bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mrrc-0.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 20db41d307b95702876b2c6a1e37771533f885d89cfaea44a9a487620eb990a0
MD5 24f3f96de2c787966575ebb756a59fae
BLAKE2b-256 4da6e52cf8a159e8dd3d6e7d180240d7b2122a327acd9cbf400733f62a4542b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp313-cp313-win_amd64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 786e819a5067a1192dc418cf197a6df3db46677d85c76d935f5c6425b3ac0989
MD5 9a82a61c54d701b503149bfda0d22dfd
BLAKE2b-256 52d33aad252bead557823fd9cbe5cf741b42886a13ecbba63e23924c65a01907

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d70c9076a550b732328f46d35d69510f0f58d71b8bca353b1c827b3482fdde01
MD5 7b7589bff95ade713a0e40b30a1a182e
BLAKE2b-256 a1f0098e5e8ffd751cb20c225f63f54c8863ff3228a6b59cbe2fae382c1907c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mrrc-0.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7c5704d8b0118e4355cf8d04e698ddce66a3355f4d81c3df056e5c8d12a4f1ba
MD5 a3bded10bd0e225560c48a91ec1732ca
BLAKE2b-256 062af39466dfe4787b5beb575995ff5ff4bb08e094e3eedfd7e0f312c0e1869e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp312-cp312-win_amd64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 decb78006dbd84eeeb8ddb75d0832dcc655697ed1515626103b89a239d5a1523
MD5 cb574fd2e324519a93787f78fccc2a33
BLAKE2b-256 807fc848a399b412bf65b07b73b393292f269b431aaf27a926a6235d9f7e8068

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af8d25bd01d997c6ed5ee899afccbf9931554ea48da74ee69d77f239ca52afc2
MD5 128e5d60c312f883ae0224560897c8bc
BLAKE2b-256 267844846c6edba14a8b00076ed3230b0d5d783d7b5d436f201c37d2d7c11425

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mrrc-0.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8d78c264be6932411dc280e3c7105b2dc232870e5ca13fbd4ece2c33b1b2ba1e
MD5 6e21798b291b0f9e97fbb98a0cc40686
BLAKE2b-256 dd28c646c25bd7cf3d7db75e2bb86cf5c8599b6ced5d9782d05f38fe48e38d05

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp311-cp311-win_amd64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4e132ac63e08f05f60689b3f9373ebfbb70720534167ac083741a6f7542f3a1d
MD5 707c5c01c0b89523aaf006d9be20e54f
BLAKE2b-256 4553a434c1f6d06a118522349a688631389c8f8e58894f1129bfd320bd415504

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 849f3695a86d66d94c03160894e4abcbc15ab1037f4f4554c497edb88497f936
MD5 b4f5760b0cdef941e113e3d162066836
BLAKE2b-256 dc042054eaa447e0f4eaf8f27bf9d488cbac2154675ff4c9837e6f3daf65d359

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mrrc-0.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f5e84eb3e352ce23b490ef5bc3d10cd03baaef4624d17fc840e88650d40d9a4
MD5 76791b5397bd5ac1f4ca2b49e7387eb0
BLAKE2b-256 2bcffafc1d2d402e445d01dbc1f96bd16e2b0909537412cad7988d0884c42ab5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp310-cp310-win_amd64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1b217e049e0f60f0b420028f8e0da27da868072a40326fedeb8dbf660ac4a21c
MD5 a8277ee4f877be192f62db198989c39e
BLAKE2b-256 7f1b5395a8242c61a9bd9ef2adc150de04a489b8ca569078ac9480d67a587ee1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mrrc-0.7.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f09c69dffd76afc2f92f153ce4229e3ad851a8e510f170bb89adb1a58477311
MD5 2bd14f98b05090d012b3b5db5bcac14d
BLAKE2b-256 d2a21854a5f5dc5ebe581315b7c3865faa5e9cd22991db42ff696b9497d8888e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-release.yml on dchud/mrrc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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