{"id":15657334,"url":"https://github.com/figsoda/pep-508","last_synced_at":"2025-04-30T08:22:13.399Z","repository":{"id":65960989,"uuid":"602842939","full_name":"figsoda/pep-508","owner":"figsoda","description":"Rust implementation of Python dependency parser for PEP 508","archived":false,"fork":false,"pushed_at":"2024-04-08T03:54:18.000Z","size":33,"stargazers_count":23,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T07:38:08.836Z","etag":null,"topics":["chumsky","parser","pep508","python","requirements","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/pep-508","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/figsoda.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-17T03:42:59.000Z","updated_at":"2024-09-02T14:37:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"cddde7fa-d826-4b8f-b82a-eeeb93f44865","html_url":"https://github.com/figsoda/pep-508","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"4f3c3e0e481e235ed1bab29803a0cf20e8212fc6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fpep-508","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fpep-508/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fpep-508/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figsoda%2Fpep-508/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/figsoda","download_url":"https://codeload.github.com/figsoda/pep-508/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666701,"owners_count":21624353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chumsky","parser","pep508","python","requirements","rust"],"created_at":"2024-10-03T13:06:22.585Z","updated_at":"2025-04-30T08:22:13.366Z","avatar_url":"https://github.com/figsoda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pep-508\n\nRust implementation of Python dependency parser for PEP 508\n\n[![version](https://img.shields.io/crates/v/pep-508?logo=rust\u0026style=flat-square)](https://crates.io/crates/pep-508)\n[![deps](https://deps.rs/repo/github/figsoda/pep-508/status.svg?style=flat-square\u0026compact=true)](https://deps.rs/repo/github/figsoda/pep-508)\n[![license](https://img.shields.io/badge/license-MPL--2.0-blue?style=flat-square)](https://www.mozilla.org/en-US/MPL/2.0)\n[![ci](https://img.shields.io/github/actions/workflow/status/figsoda/pep-508/ci.yml?label=ci\u0026logo=github-actions\u0026style=flat-square)](https://github.com/\u003c\u003cgithub\u003e\u003e/actions/workflows/ci.yml)\n\n[Documentation](https://docs.rs/pep-508)\n\n## Usage\n\n```rust\nlet dep = \"requests[security, socks] \u003c= 2.28.1, == 2.28.*; python_version \u003e '3.7' and extra == 'http'\";\nlet parsed = parse(dep).unwrap();\nlet expected = Dependency {\n    name: \"requests\",\n    extras: vec![\"security\", \"socks\"],\n    spec: Some(Spec::Version(vec![\n        VersionSpec {\n            comparator: Comparator::Le,\n            version: \"2.28.1\",\n        },\n        VersionSpec {\n            comparator: Comparator::Eq,\n            version: \"2.28.*\",\n        },\n    ])),\n    marker: Some(Marker::And(\n        Box::new(Marker::Operator(\n            Variable::PythonVersion,\n            Operator::Comparator(Comparator::Gt),\n            Variable::String(\"3.7\"),\n        )),\n        Box::new(Marker::Operator(\n            Variable::Extra,\n            Operator::Comparator(Comparator::Eq),\n            Variable::String(\"http\"),\n        )),\n    )),\n};\nassert_eq!(parsed, expected);\n```\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigsoda%2Fpep-508","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffigsoda%2Fpep-508","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigsoda%2Fpep-508/lists"}