use-python-version 0.0.1

Python version and implementation primitives for RustUse
Documentation
1
2
3
4
5
6
7
8
9
10
use use_python_version::{PythonImplementation, PythonVersion};

fn main() -> Result<(), use_python_version::PythonVersionParseError> {
    let version: PythonVersion = "v3.13.0".parse()?;

    assert_eq!(version.to_string(), "3.13.0");
    assert!(version.is_python3());
    assert_eq!(PythonImplementation::CPython.as_str(), "cpython");
    Ok(())
}