--- id: node-semver version: "0.9.1" license: mit license_treatment: permissive maintenance: active --- # node-semver — port of node-semver License: permissive · Maintenance: active · Downloads: 2.2M/mo ## 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 above — 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 pip install node-semver uv add node-semver poetry add node-semver ## Installing 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: unspecified - Install friction: low - Maintenance: active - Downloads: 2.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags semantic versioning, semver range matching, version comparison, node-semver python, version constraint resolution, prerelease version handling, version-management, semver [View on SkillFed](https://skillfed.io/packages/node-semver) · [View on PyPI](https://pypi.org/project/node-semver/)