47 releases
Uses new Rust 2024
| new 0.0.47 | May 12, 2026 |
|---|---|
| 0.0.46 | May 11, 2026 |
| 0.0.41 | Apr 27, 2026 |
| 0.0.35 | Mar 26, 2026 |
| 0.0.3 | Nov 26, 2025 |
#603 in Math
4,127 downloads per month
Used in 32 crates
(18 directly)
1MB
19K
SLoC
A library for dependency specifiers previously known as PEP 508
Usage
use std::str::FromStr;
use uv_pep508::{Requirement, VerbatimUrl};
use uv_normalize::ExtraName;
let marker = r#"requests [security,tests] >= 2.8.1, == 2.8.* ; python_version > "3.8""#;
let dependency_specification = Requirement::<VerbatimUrl>::from_str(marker).unwrap();
assert_eq!(dependency_specification.name.as_ref(), "requests");
assert_eq!(dependency_specification.extras, vec![ExtraName::from_str("security").unwrap(), ExtraName::from_str("tests").unwrap()].into());
Half of these tests are copied from https://github.com/pypa/packaging/pull/624
uv-pep508
This crate is an internal component of uv. The Rust API exposed here is unstable and will have frequent breaking changes.
This version (0.0.47) is a component of uv 0.11.14. The source can be found here.
See uv's crate versioning policy for details on versioning.
Dependencies
~21–50MB
~858K SLoC