node-semver
port of node-semver
What it is and what it does
node-semver is a Python port of the Node.js semver library, providing semantic version parsing, comparison, and range matching. It lets you evaluate version strings against semver range expressions (like '~1.2.3'), find the highest version in a list that satisfies a constraint, and validate version strings. The library handles prerelease versions, loose parsing modes, and multi-digit version components.
You'd use it when your Python application needs to resolve version constraints the way Node.js does—for example, in package managers, dependency resolvers, or any tool that must respect npm-style version semantics. It has no external dependencies and supports modern Python versions.
Use it for:
- Resolve version constraints in a Python package manager or dependency resolver using Node.js semver rules.
- Filter a list of available versions to find the best match for a given semver range expression.
- Validate and compare version strings in build or deployment tools that must interoperate with Node.js ecosystems.
- Handle prerelease and build metadata in version selection logic with fine-grained control over inclusion rules.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and compares semantic version strings using Node.js semver rules, including range matching and prerelease handling.
Yes. Low install friction, no dependencies, active maintenance, permissive license, and no known vulnerabilities make it a safe choice. Install it if you need Node.js-compatible semver semantics in Python; skip it if you only need basic version comparison or Python's own versioning rules.
Install
node-semver on PyPI
pip
pip install node-semveruv
uv add node-semverpoetry
poetry add node-semverInstalling node-semver
Before you install
Low friction install with no runtime dependencies. Actively maintained as of 2026-06-23 with recent updates.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions.
Quickstart
pip install node-semver
from node-semver import max_satisfying
versions = ['1.2.3', '1.2.4', '1.2.5', '1.2.6']
result = max_satisfying(versions, '~1.2.3')
Verify before relying
- Whether all Node.js semver semantics are fully implemented or if there are known gaps vs. the original.
- Performance characteristics when handling large version lists or complex range expressions.
- Which specific functions beyond max_satisfying are available in the public API.
Package facts
| License | mit (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 52 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,162,742/month — #3,240 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: node_semver-0.9.1-py3-none-any.whl
Keywords: version, semver, node-semver
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
semverParse, compare, and manipulate semantic version…
permissive · top 1,000 on PyPI
semantic-versionParses, validates, and compares semantic…
permissive · top 1,000 on PyPI
versionsParses, compares, and validates semantic…
permissive · top 15,000 on PyPI
verspecverspec parses and compares software version…
permissive · top 5,000 on PyPI
bump-my-versionAutomates version number management in projects…
permissive · top 5,000 on PyPI
bumpAutomatically increments version numbers in…
permissive · top 15,000 on PyPI
bumpverBumpVer is a CLI tool that searches for and…
permissive · top 15,000 on PyPI
python-semantic-releaseAutomates semantic versioning and release…
permissive · top 5,000 on PyPI
awesomeversionParse and compare version strings across…
permissive · top 5,000 on PyPI
release-tagAutomatically creates and optionally pushes…
permissive · top 15,000 on PyPI