Expand description
§use-python-version
Python version and implementation primitives for RustUse.
§Experimental
use-python-version is experimental while use-python remains below 0.3.0.
§Example
use use_python_version::{PythonImplementation, PythonVersion};
let version: PythonVersion = "Python 3.12.1".parse()?;
assert_eq!(version.major(), 3);
assert_eq!(version.minor(), Some(12));
assert!(version.is_python3());
assert_eq!(PythonImplementation::CPython.as_str(), "cpython");§Scope
- Lightweight Python version components and parsing.
- Python implementation labels.
- Compatibility, ABI, and platform tag text newtypes.
§Non-goals
- Full PEP 440 parsing.
- Support-window or EOL-date policy.
- Querying installed Python interpreters.
§License
Licensed under either Apache-2.0 or MIT.
Structs§
- Python
AbiTag - Python
Compatibility Tag - Python
Major Version - Python major version component.
- Python
Minor Version - Python minor version component.
- Python
Patch Version - Python patch version component.
- Python
Platform Tag - Python
Version - Lightweight Python version metadata.
Enums§
- Python
Implementation - Python implementation label.
- Python
Version Family - Python version family label.
- Python
Version Parse Error - Error returned while parsing Python version metadata.