{"id":46752,"library":"version-parser","title":"VersionParser","description":"A lightweight Python package to parse and compare semantic versioning strings. Current version 1.0.1, low release cadence.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/eieste/VersionParser","tags":["semver","version parsing","version comparison"],"install":[{"cmd":"pip install version-parser","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"The class is named Version, not VersionParser","wrong":"from version_parser import VersionParser","symbol":"VersionParser","correct":"from version_parser import Version"}],"quickstart":{"code":"from version_parser import Version\nv = Version('1.2.3')\nprint(v.major, v.minor, v.patch)  # 1 2 3\nprint(v == Version('1.2.3'))  # True","lang":"python","description":"Parse and access version parts."},"warnings":[{"fix":"Use: from version_parser import Version","message":"The main class is named Version, not VersionParser. Common mistake: from version_parser import VersionParser fails.","severity":"gotcha","affected_versions":"all"},{"fix":"Use correct install command and import.","message":"The package uses 'version_parser' as module name, but pip package is 'version-parser' (hyphen vs underscore).","severity":"deprecated","affected_versions":"all"},{"fix":"Ensure version string matches MAJOR.MINOR.PATCH pattern (no 'v' prefix).","message":"Version strings must be strictly semver (e.g., '1.2.3'). Pre-release or build metadata may cause unexpected behavior.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.1':15 'cadenc':18 'compar':9 'comparison':23 'current':13 'lightweight':3 'low':16 'packag':5 'pars':7,21 'python':4 'releas':17 'semant':10 'semver':19 'string':12 'version':11,14,20,22 'versionpars':1","created_at":"2026-06-07T13:01:27.610917+00:00","updated_at":"2026-06-07T13:01:27.610917+00:00","problems":[{"fix":"Run: pip install version-parser (note hyphen, not underscore). Then import: from version_parser import Version","cause":"Installed wrong package or forgot to install.","error":"ModuleNotFoundError: No module named 'version_parser'"},{"fix":"Use: from version_parser import Version","cause":"Trying to import 'VersionParser' which does not exist.","error":"AttributeError: module 'version_parser' has no attribute 'VersionParser'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/eieste/VersionParser","github":"https://github.com/eieste/VersionParser","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}