https://github.com/pevers/pep508_parser
PEP-508 parser written in Rust
https://github.com/pevers/pep508_parser
parser pep508 python rust
Last synced: about 2 months ago
JSON representation
PEP-508 parser written in Rust
- Host: GitHub
- URL: https://github.com/pevers/pep508_parser
- Owner: pevers
- License: mit
- Created: 2022-11-06T13:59:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-13T13:28:51.000Z (over 3 years ago)
- Last Synced: 2025-12-11T08:21:14.347Z (6 months ago)
- Topics: parser, pep508, python, rust
- Language: Rust
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pep508_parser [](https://github.com/pevers/pep508_parser/actions/workflows/ci.yaml)
This crate parses [PEP-508](https://peps.python.org/pep-0508/) strings for Rust.
It uses [pest](https://github.com/pest-parser/pest) under the hood to parse a simplified version of the Parsing Expression Grammar (PEG) of the PEP-508 standard.
```toml
[dependencies]
pep508_parser = "0.1.0"
```
```rust
use pep508_parser::parse;
fn main() {
let dependency =
parse("name[quux, strange];python_version<'2.7' and platform_version=='2'").unwrap();
}
```