skillfed

mozilla-version

Process Firefox versions numbers. Tells whether they are valid or not, whether they are nightlies or regular releases, whether this version precedes that other.

mozilla-version v5.1.0 74.3K downloads/30d#14,853 on PyPI5
Copyleft license MPL-2.0 Active released

What it is and what it does

mozilla-version is a Python library that parses and validates version numbers used by Mozilla's build and release pipelines for products like Firefox, Fennec, Fenix, and Thunderbird. It provides an object-oriented interface to determine whether a version string is valid, classify it as a nightly or regular release, extract metadata like beta numbers, and compare versions for ordering. The library uses a two-pass validation approach: a loose regex filter followed by strict semantic checks, and accounts for historical edge cases found in Mozilla's release archives.

The package solves the problem of version handling fragmentation across Mozilla's infrastructure by centralizing version logic in a single source of truth. Instead of reimplementing regex-based parsing in multiple scripts, consumers create version objects once and then query their properties or sort them naturally. It depends only on attrs for class generation and supports current Python versions (3.9+).

Use it for:

  • Validate Firefox version strings in build pipelines before publishing releases.
  • Sort a list of mixed Firefox version strings (alphas, betas, releases) in correct semantic order.
  • Detect whether a given version is a nightly build to route it to different testing or distribution channels.
  • Compare two Thunderbird version numbers to determine which is newer without string manipulation.
  • Enforce version number compliance in release tooling to catch malformed version inputs early.

Worth the install?

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

Parse and validate Mozilla product version numbers, classify them as nightlies or releases, and compare versions for ordering.

Yes. This is a focused, well-maintained utility with low install friction, no known vulnerabilities, and a clear use case for anyone working with Mozilla product versioning. The copyleft license is standard for Mozilla projects and poses no barrier to most uses. Install it if you need to parse or validate Mozilla version numbers; skip it if you only work with standard semantic versioning.

Install

mozilla-version on PyPI

pip

pip install mozilla-version

uv

uv add mozilla-version

poetry

poetry add mozilla-version

Installing mozilla-version

Before you install

Low friction install with a single runtime dependency (attrs). Active maintenance with a recent release 58 days ago and commits through August 2026.

License in practice

MPL-2.0 is a copyleft license; you must disclose source and license terms if you distribute this package or derivative works, but it permits commercial use and private modification.

Quickstart

pip install mozilla-version

from mozilla_version.firefox import FirefoxVersion

version = FirefoxVersion.parse("84.0b3")
print(version.is_beta, version.beta_number)

Requires Python 3.9 or later.

Verify before relying

  • Whether the library handles all current Firefox, Fennec, Fenix, and Thunderbird version schemes or only a subset.
  • Performance characteristics when parsing or comparing large batches of version strings.

Package facts

License MPL-2.0 (copyleft)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 1 — attrs
Maintenance actively maintained — 58 days since the last release
Last repo commit
First released
Downloads 74,293/month — #14,853 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mozilla_version-5.1.0-py3-none-any.whl

Tags

mozilla version parsingfirefox version validationversion number comparisonnightly release detectionmozilla build versioning
version-parsingmozilla-releng

More Build Tools packages