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, Dublin Core, MODS, BIBFRAME
  • 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

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
ISO 2709 Yes Yes
JSON Yes Yes
MARCJSON Yes Yes
XML Yes Yes
CSV - Yes
Dublin Core - Yes
MODS - Yes
BIBFRAME Yes Yes

Full format reference

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.1-cp314-cp314-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.14Windows x86-64

mrrc-0.7.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

mrrc-0.7.1-cp314-cp314-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

mrrc-0.7.1-cp313-cp313-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.13Windows x86-64

mrrc-0.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

mrrc-0.7.1-cp313-cp313-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

mrrc-0.7.1-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

mrrc-0.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mrrc-0.7.1-cp312-cp312-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

mrrc-0.7.1-cp311-cp311-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.11Windows x86-64

mrrc-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mrrc-0.7.1-cp311-cp311-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

mrrc-0.7.1-cp310-cp310-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10Windows x86-64

mrrc-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mrrc-0.7.1-cp310-cp310-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: mrrc-0.7.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.7 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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 99acc8fe88e92b5355407856ea2e0f89a61b4f053789debea7f4be8d1ece0d05
MD5 dcc2b99d9391da16411a2d6b7a470f9f
BLAKE2b-256 6efd1852739d4cdcb8cc51a8e8b4dc53b3618bfe01e1b67ac7b5feb61862a606

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7705fe1bd6f2d871e857a6094aea65450eda96ce4264ab6e02aa95d354b82e8
MD5 34bddd3e0c4f5647cf157b57bc6492f7
BLAKE2b-256 f389dcbcec0239ea2b34bdb7a15e986de5a296963dbc47266df3002bc7d98f63

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe222494dade1c9340ff2445c931f970e43b9074158306b8256b138f97ff428b
MD5 df5034c6f8b94c1ba713ecbea7f5a887
BLAKE2b-256 121bfb8e41f0a9160268609f5f20589848ec795f1a5c666c7a2b441f295a4193

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.7 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 acdb573d3b755fbd819dd47afc8a4573577aff7ef68c3ac07fb27eefa5b09202
MD5 bab046da645252394b1ad8b38f8ca102
BLAKE2b-256 f96adb6ad02d21f62ed51b2de9b692d8f95a22fdd3fc9b71d084f32f30ac2ea0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 56a6b4e097c010d4647890cee702c7d4615297a7c2703a1a6258c28cce2055e8
MD5 1fddd7bea7789c8b635abd0cf53d6369
BLAKE2b-256 48a6e0edb1b38c45e8fb42b5526923d455ebe56b7b7368f1d0e4d483845f03ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c8d950385bb6f2f8d2951bc55a597520785f121835ca19607f4ce0f3d84c9f8
MD5 b0e64c8e3c473c0616a0af068f7a3cc0
BLAKE2b-256 57464d82dd112c219cbba143c389cddc79f2b13ec40050e35a3eb5261ca3787e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.7 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a587710c15ea5d495849acb4f3aa15a3f0791ccd2f6eff04bfb7b63b0cd0335a
MD5 25e1393a0c6a4fbc1df097dd56a56b26
BLAKE2b-256 822f6f33ec672ac8b8e829780733e2536c50a1333d0aa17fc30e1bf0733919c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be963bcf291bddbc804aa175c609818a11110723b6870b68d3d9a4f7063043d7
MD5 ba7df882576dfa815852bc835d6034a0
BLAKE2b-256 52a9e6f0f14a6e972356f878e372f957a5877575e086fdf9346c3b0768c88d7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8eb04ed9c44db87e7f40e2d107220962ae02625b14ecd21780555365e6436300
MD5 68dbdb386593250ccef4c33c58908b6d
BLAKE2b-256 d275a32c1caceb2d3eb01534f13577b2d8eff94187388bb3a0437f2cb13b141c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.7 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5a2cc2402e818d3db7bf92dd9a8bf5dd19a0140b6cb0b943fc692505849b836d
MD5 18b959b81c78b897ff7599f554df2227
BLAKE2b-256 897ffb3794f39aa6e470446395eae85f3fd8a5c71c43c6ed0fb8ebf175c6bf3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c49f5e978f04f183aa8054ad9d80d3342cd963f06dea2b510e7a303a572aee44
MD5 f2c5f8859c21e2e3f477864fea3a6c44
BLAKE2b-256 3e56cdf203abda4da0757bfb6e559704bab20cfcd7e0e49b97fc14b611bc6075

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b9cb6d83cafe2c6b409ffaace2242d1743404cb7dfda82a8b942dba85a2b9cb9
MD5 af72d4a67e46faac6487e0a21206ccc3
BLAKE2b-256 49f1e58f018902ab1395c1c4266b6211910f93e9e9d1a0840fc627fe70e3c97c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mrrc-0.7.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.7 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9b9d363b8de12ce39d48e30578f6d6c70ca109fb8a0d87600ea6214c0c1bd507
MD5 7fad421798d7b99d065952ddeea9757a
BLAKE2b-256 231a55d85489e54aba7bb7df6d0113ea403d253e35da19ee453eff998ae31847

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6e8f1ee7aafc3f13c800470508b64a3ae7074a74088c82727298f2bec3bf0d2
MD5 bc09d053fbc4f8a83128c919bc1d5034
BLAKE2b-256 c7f09b2fff19caadee66481dc01cd741b6667c5a9da03487fc561c8d5e4a4726

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mrrc-0.7.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 313cb2c2e3df281e67642ffd051375ef6eb3f18695d59589773540ef26618363
MD5 1928cbe617b73c8d1b94370b3646d84a
BLAKE2b-256 4a4c119f8c206da58fd18322edd126bd2f716ec6f2e87b9ff526e418a7674faa

See more details on using hashes here.

Provenance

The following attestation bundles were made for mrrc-0.7.1-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