python_version_basic_usage/basic_usage.rs
1use use_python_version::{PythonImplementation, PythonVersion};
2
3fn main() -> Result<(), use_python_version::PythonVersionParseError> {
4 let version: PythonVersion = "v3.13.0".parse()?;
5
6 assert_eq!(version.to_string(), "3.13.0");
7 assert!(version.is_python3());
8 assert_eq!(PythonImplementation::CPython.as_str(), "cpython");
9 Ok(())
10}