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.68.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.68.0
File Size Uploaded Provenance
pymzdata-0.68.0.tar.gz 874.4 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for pymzdata 0.68.0
File
pymzdata-0.68.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
pymzdata-0.68.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.68.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
pymzdata-0.68.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 18.5 MB

Release files / pymzdata-0.68.0.tar.gz

Download URL pymzdata-0.68.0.tar.gz
Size 874.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4aad2964b44f59c9faeed33f60df9a9e60e40b7dd853ede8d83ee93be6114e4f
BLAKE2b-256 checksum
How to use checksums
30c5114fb49944f88f588fdce65cbb93bcb098d1a4cd5b52d09c067b517427ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via maturin/1.15.0

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

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

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

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

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

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

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

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

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