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.67.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.67.0
File Size Uploaded
pymzdata-0.67.0.tar.gz 855.6 kB Details

Built distributions (wheels)

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

Total release size: 18.3 MB

Release files / pymzdata-0.67.0.tar.gz

Download URL pymzdata-0.67.0.tar.gz
Size 855.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7114ee112847ca19b0e2b3221fe40ed6045f2b44548c631c5c8c51b1e91a92de
BLAKE2b-256 checksum
How to use checksums
7e11a41f3b48e02bd2cbb79a8570f7b87d0f3d13b97a3e0d93406c53090997e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL pymzdata-0.67.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
6d09bba6bfbc94d7da83a2119df1b1648c731e655f85baa4543d9170fce5e734
BLAKE2b-256 checksum
How to use checksums
7d570dc94be7fbab6c082a3ecf0e4c78a405fab6250a4becbe8e0a222ac0cc45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL pymzdata-0.67.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_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
d805abe4050ab8e59e3d2b77cd20444001cb3675d6b6c21be76b58e5fa7a9d2c
BLAKE2b-256 checksum
How to use checksums
21f0809cfaa636bc4bc33d74da05d074f809e5621e576c3c2bf90e145e4e59d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL pymzdata-0.67.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
fe58f6676d6ff2e43c5e7757b0af59691984bf12646a1287cdba97a8b80cf50c
BLAKE2b-256 checksum
How to use checksums
e9c04f0337b417bb7946017e30bc55ba1f58cf4e7882c5143268bd77dc1a7b5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

Download URL pymzdata-0.67.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
53aad6dec1c5243df308c47868fe0edbb0073fedc2d8ef1e1f9f243ad66318cf
BLAKE2b-256 checksum
How to use checksums
2ec8e11b6f75dc89a95945206c41d286f79e9e328fcaf79deeb32b90df966eab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

Release history Release notifications | RSS feed

0.67.4

5 release files

This release

0.67.0 This release

5 release files

0.66.7

5 release files

0.66.6

5 release files

0.66.1

5 release files

0.66.0

5 release files

0.65.5

5 release files

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