{"id":2181,"library":"parver","title":"parver: Parse and Manipulate Version Numbers","description":"parver is a Python package designed for robust parsing and manipulation of PEP 440 compliant version numbers. It provides a `Version` class to represent versions and methods for common operations like bumping development or release segments, checking pre-release status, and normalization. The library is currently at version 0.5 and maintains a stable, active development status.","status":"active","version":"0.5","language":"python","source_language":"en","source_url":"https://github.com/RazerM/parver","tags":["versioning","pep440","semver","packaging","parsing"],"install":[{"cmd":"pip install parver","lang":"bash","label":"Install stable release"}],"dependencies":[{"reason":"Requires Python 3.8 or newer for execution.","package":"python","optional":false}],"imports":[{"symbol":"Version","correct":"from parver import Version"}],"quickstart":{"code":"from parver import Version\n\n# Parse a version string\nv = Version.parse('1.3.0.dev1')\nprint(f\"Original version: {v}\")\n\n# Access parts of the version\nprint(f\"Major: {v.major}, Minor: {v.minor}, Patch: {v.patch}\")\nprint(f\"Is pre-release: {v.is_prerelease}\")\nprint(f\"Development part: {v.dev}\")\n\n# Bump the development version\nv_dev = v.bump_dev()\nprint(f\"Bumped dev version: {v_dev}\")\n\n# Bump a release segment (e.g., patch, which is index 2)\nv_patch = Version.parse('1.2.3').bump_release(index=2)\nprint(f\"Bumped patch version: {v_patch}\")\n\n# Normalize a version\nv_norm = Version.parse('v1.2.alpha-3').normalize()\nprint(f\"Normalized version: {v_norm}\")","lang":"python","description":"This quickstart demonstrates how to parse a version string into a `Version` object, access its components, and perform common manipulations such as bumping development or release segments, and normalizing the version format."},"warnings":[{"fix":"Ensure input version strings conform to PEP 440 specifications. Refer to the official PEP 440 documentation for valid version formats.","message":"parver strictly adheres to PEP 440 for version parsing. Providing non-PEP 440 compliant strings may result in `InvalidVersion` exceptions or unexpected parsing behavior.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always parse version strings into `Version` objects (e.g., `Version.parse('1.0')`) before performing comparisons with other `Version` objects or if specific PEP 440 comparison logic is desired.","message":"When comparing `Version` objects, ensure both operands are `Version` instances for reliable and consistent results. While some direct comparisons with strings might work, it's generally safer to explicitly parse strings into `Version` objects before comparison.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the `parver` documentation for the precise behavior of `bump_major()`, `bump_minor()`, `bump_patch()`, and `bump_release(index=...)` to ensure it matches the desired versioning strategy. For strict SemVer, consider a dedicated SemVer library or adapt `parver`'s methods carefully.","message":"Users accustomed to Semantic Versioning (SemVer) might find `parver`'s `bump_*` methods behave differently. `parver` follows PEP 440's interpretation of version segments, which may not align directly with SemVer's `major.minor.patch` increment rules (e.g., `bump_release(index=2)` is used for patch).","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.5':56 '440':20 'activ':61 'bump':38 'check':43 'class':28 'common':35 'compliant':21 'current':53 'design':12 'develop':39,62 'librari':51 'like':37 'maintain':58 'manipul':4,17 'method':33 'normal':49 'number':6,23 'oper':36 'packag':11,67 'pars':2,15,68 'parver':1,7 'pep':19 'pep440':65 'pre':45 'pre-releas':44 'provid':25 'python':10 'releas':41,46 'repres':30 'robust':14 'segment':42 'semver':66 'stabl':60 'status':47,63 'version':5,22,27,31,55,64","created_at":"2026-04-09T18:46:58.997472+00:00","updated_at":"2026-04-16T17:54:05.505720+00:00","problems":[{"fix":"Install the package using pip: `pip install parver`","cause":"The 'parver' package is not installed in the Python environment where you are trying to use it.","error":"ModuleNotFoundError: No module named 'parver'"},{"fix":"Ensure the version string is a valid PEP 440 compliant format. For example, '1.2.3' is valid, but 'v1.2.3' or '1.2.3.ALPHA' are not directly parsable without pre-processing.","cause":"The version string provided to `parver.Version.parse()` does not strictly conform to the PEP 440 specification, which `parver` enforces by leveraging `packaging.version`.","error":"packaging.version.InvalidVersion: Invalid version: 'some_malformed_version_string'"},{"fix":"Consult the `parver` documentation or source code for available attributes and methods. To create a new version with modifications, use methods like `bump_major()`, `bump_minor()`, `bump_patch()`, `replace()`, etc., which return a *new* `Version` object rather than modifying the existing one.","cause":"You are attempting to access an attribute (e.g., 'major', 'minor', 'patch', 'is_prerelease') on a `parver.Version` object that either does not exist or is not directly accessible in the way you are trying to use it. This can also occur if you try to assign a new value to a version segment, as `Version` objects are immutable.","error":"AttributeError: 'Version' object has no attribute 'non_existent_attribute'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.0.1.post0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/RazerM/parver","docs":"https://parver.readthedocs.io","changelog":null,"pypi":"https://pypi.org/project/parver/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-28","install_tag":null}}