skillfed

pymzml

high-throughput mzML parsing

pymzml v2.6.1 166.3K downloads/30d#10,501 on PyPI194
Permissive license The MIT license Active released

What it is and what it does

pymzml is a Python parser for mzML, the standard mass spectrometry data format used in proteomics and metabolomics research. It provides fast, seekable access to spectra stored in mzML files—including support for compressed formats—and includes utilities for spectrum comparison and visualization. The core library depends only on numpy and regex, keeping installation simple, though optional extras add plotting and deconvolution capabilities.

The package is aimed at bioinformaticians and researchers who need to programmatically extract and analyze mass spectrometry data. It has been actively maintained since 2012 and currently requires Python 3.10 or higher. Installation is straightforward via pip, with optional feature flags for extended functionality like interactive plotting or pynumpress compression support.

Use it for:

  • Extract and iterate over spectra from mzML files in a proteomics workflow.
  • Build custom mass spectrometry data analysis pipelines that need rapid spectrum access.
  • Compare spectra or perform spectral matching in metabolomics studies.
  • Integrate mzML parsing into bioinformatics tools for automated MS data processing.
  • Visualize mass spectrometry data interactively during exploratory analysis.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

pymzml parses mzML mass spectrometry data files in Python, providing fast random access to spectra and tools for spectrum comparison and visualization.

Yes. pymzml is actively maintained, has low install friction, carries no known vulnerabilities, and is the standard choice for mzML parsing in Python. Install it if you work with mass spectrometry data in proteomics or metabolomics; the core library is lightweight and optional features are available if needed.

Install

pymzml on PyPI

pip

pip install pymzml

uv

uv add pymzml

poetry

poetry add pymzml

Installing pymzml

Before you install

Low friction install with only numpy and regex as core dependencies. Active maintenance with a recent release (52 days old) and ongoing repository activity. Requires Python 3.10 or higher.

License in practice

MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute pymzml provided you include the license notice.

Quickstart

pip install pymzml
import pymzml
# Parse an mzML file and access spectra
run = pymzml.run.Reader('data.mzML')
for spectrum in run:
    print(spectrum.ID, spectrum.mz, spectrum.i)

Requires Python 3.10 or higher; numpy must be installed before optional dependencies like pynumpress.

Verify before relying

  • Whether the package's spectrum comparison and visualization functions work out-of-the-box or require optional dependencies.
  • Performance characteristics for very large mzML files or highly compressed formats.
  • Whether random access in compressed files requires specific file preparation or encoding.

Package facts

License The MIT license (permissive)
Python support supports the current Python release (>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 2 — numpy, regex
Maintenance actively maintained — 52 days since the last release
Last repo commit
First released
Downloads 166,281/month — #10,501 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pymzml-2.6.1-py3-none-any.whl

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: POSIX :: SunOS/SolarisOperating System :: UnixProgramming Language :: Python :: 3.5Topic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: ChemistryTopic :: Scientific/Engineering :: Medical Science Apps.

Tags

mzml parser pythonmass spectrometry data parsingms data accessspectrum parsing libraryproteomics data readermzml file readermass spec file format
mass-spectrometrybioinformaticsdata-parsing

More Bio-Informatics packages