mzmlpy¶
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.
Where next¶
- Getting started: install options, reading spectra, gzip modes, validation.
- MCP server: connect an AI client to local mzML files.
- API reference: every public class and function.
- Using an AI coding assistant? Point it at
llms.txtfor a short index, orllms-full.txtfor the full API guide.
Related packages¶
The tacular-omics mass spectrometry stack:
- tdfpy reads Bruker timsTOF
.ddata. - mzmlpy reads mzML files. (this package)
- spxtacular processes the spectra from both: centroiding, deconvolution, matching, scoring and plotting.