packaging
| Use Case | Command | Description |
|---|---|---|
| Parse a version string | packaging.version.parse("21.3") | ๐ฅ Returns a Version object from a PEP 440 version string |
| Compare two versions | Version("21.3") > Version("20.0") | ๐ Supports standard comparison operators for version ordering |
| Parse a requirement specifier | packaging.requirements.Requirement("requests>=2.0") | ๐ Breaks a requirement string into name, extras, specifier set, and markers |
| Check version against specifier | SpecifierSet(">=1.0,<3.0").contains(Version("2.5")) | โ Test if a version satisfies a set of version specifiers |
| Evaluate a PEP 508 marker | packaging.markers.Marker("python_version >= '3.6'").evaluate() | ๐งช Check if the current environment matches a marker expression |
| Get platform compatibility tags | packaging.tags.sys_tags() | ๐ท๏ธ Generate a sequence of compatible wheel tags for the current platform |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
__about___manylinux_musllinux_structuresmarkersrequirementsspecifierstagsutilsversion__all__ = ['__title__', '__summary__', '__uri__', '__version__', '__au...__copyright__ = '2014-2019 Donald Stufft and individual contributors'__email__ = 'donald AT stufft.io'__license__ = 'BSD-2-Clause or Apache-2.0'__summary__ = 'Core utilities for Python packages'__title__ = 'packaging'__uri__ = 'https://github.com/pypa/packaging'21.3
Donald Stufft and individual contributors
/usr/lib/python3/dist-packages/packaging/__init__.py
Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-02 19:11 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)