Skip to main content

pymzdata

pymzdata provides Python bindings for mzdata, a fast Rust library for reading mass spectrometry data files.

Supported formats

MZReader supports mzML and indexed mzML, MGF, Bruker TDF, and imzML files. IMMZReader provides ion-mobility frame access for compatible mzML and Bruker TDF files. Thermo RAW is also supported when its native runtime dependencies are available on the host system.

Installation

pip install pymzdata

Python 3.9 or later is required. NumPy is installed automatically and is used for the peak arrays returned by the reader.

Quickstart

import pymzdata

with pymzdata.MZReader("example.mzML") as reader:
    print(f"{len(reader)} spectra")

    for spectrum in reader:
        print(spectrum.id, spectrum.ms_level, spectrum.start_time)
        mz = spectrum.mz_array()
        intensity = spectrum.intensity_array()
        if mz is not None:
            print(f"  {len(mz)} peaks")

MZReader supports iteration and random access with get_by_index, get_by_id, and get_by_time (retention time in minutes). Spectrum metadata, precursor information, and decoded NumPy peak arrays are available from each Spectrum.

For Bruker ion-mobility data, use IMMZReader directly or convert an open MZReader with into_frame_reader() to access ion-mobility frames.

Development

To build the bindings from a checkout, install maturin and run:

cd crates/pymzdata
maturin develop

Metadata

Release files for pymzdata 0.69.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 pymzdata 0.69.0
File Size Uploaded Provenance Actions
pymzdata-0.69.0.tar.gz 875.0 kB Without provenance Details for pymzdata-0.69.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pymzdata 0.69.0
File Actions
pymzdata-0.69.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for pymzdata-0.69.0-cp39-abi3-win_amd64.whl
pymzdata-0.69.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for pymzdata-0.69.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
pymzdata-0.69.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for pymzdata-0.69.0-cp39-abi3-macosx_11_0_arm64.whl
pymzdata-0.69.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for pymzdata-0.69.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 18.4 MB

Release files / pymzdata-0.69.0.tar.gz

Download URL pymzdata-0.69.0.tar.gz
Size 875.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d218cccf65f71d4778f241d6722e6de5d455eb3da59a746c0c497575c0324f97
BLAKE2b-256 checksum
How to use checksums
04aa91b2d44b23a75797fa7f0cea71334cf41f75ee2702390557d202a99a872d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / pymzdata-0.69.0-cp39-abi3-win_amd64.whl

Download URL pymzdata-0.69.0-cp39-abi3-win_amd64.whl
Size 4.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ed15e60ea4b489405268251b41ec5f07031a1a8e791de57c34745d76310b2203
BLAKE2b-256 checksum
How to use checksums
c16c3b43317c3305e9f536e4822732487ca31a5872d894fdb1294b10759464c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / pymzdata-0.69.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL pymzdata-0.69.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 4.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f382957fd492bd1315c2d75ef55ee0a6b053b7343f7f5d29f79fb95e44ed9138
BLAKE2b-256 checksum
How to use checksums
47d649410a4785eff0fca490f0d9b2ec03e53108ba5f966d131c40edfcce475a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / pymzdata-0.69.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL pymzdata-0.69.0-cp39-abi3-macosx_11_0_arm64.whl
Size 4.2 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
33fb001edc7d59f51ab539b231df32c3f1f12958aa30e1ce3a34c817f6f95c6a
BLAKE2b-256 checksum
How to use checksums
e2d73d4371ec0b619b2c5fc16ee53fa79b410e01adcb84d5726c6fcc7bab5004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Release files / pymzdata-0.69.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL pymzdata-0.69.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 4.4 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ce181df6ef4d5e68e7428e2f9a36e2b2aa6d8d889d562c0cf55f16279a0a016a
BLAKE2b-256 checksum
How to use checksums
5a607bc58a2e0932f457a8d1e0750b308cfe986ecbd634eed4c7645428354e5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.16.0

Security for pymzdata 0.69.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