Skip to content

mzmlpy

CI codecov PyPI version DOI Python 3.12+ License: MIT

mzmlpy is a lightweight, type-safe Python library for reading mzML mass spectrometry files, including gzipped .mzML.gz. Metadata is parsed into typed models, while m/z, intensity, ion mobility and other binary arrays are decoded only when you ask for them.

Spectra and chromatograms can be iterated, indexed, sliced, looked up by native ID, or filtered on metadata without decoding peaks. zlib, MS-Numpress and Zstandard arrays are supported, and mzmlpy opens and indexes files about 20x faster than pyteomics, with full decoding on par with pyteomics and pymzml. An optional MCP server lets AI clients inspect local mzML files.

pip install mzmlpy

Where next

The tacular-omics mass spectrometry stack:

  • tdfpy reads Bruker timsTOF .d data.
  • mzmlpy reads mzML files. (this package)
  • spxtacular processes the spectra from both: centroiding, deconvolution, matching, scoring and plotting.