Python requirements.txt Parser
Parse pip requirements with extras, markers, editable installs, and URL pins. Validate PEP 440 and reformat.
Lines
16
Packages
6
Issues
0
| Kind | Name | Specifier / target | Extras / marker | Note |
|---|---|---|---|---|
| Comment | Web framework | Web framework | ||
| Package | fastapi | >=0.110,<1.0 | ||
| Package | uvicorn | ==0.30.1 | [standard] | |
| Comment | Data | Data | ||
| Package | requests | ==2.32.0 | pinned for compat | |
| Package | pydantic | >=2.6 | ||
| Package | sqlalchemy | >=2.0 | ; python_version >= "3.9" | |
| Comment | Dev | Dev | ||
| Include file | dev-requirements.txt | |||
| Editable | ./local-pkg | |||
| Comment | Direct URL | Direct URL | ||
| URL install | torch | https://download.pytorch.org/whl/cpu/torch-2.1.0%2Bcpu-cp311-cp311-linux_x86_64.whl | ||
Normalized, sorted, deduped
What gets parsed
- Plain requirements:
requests==2.32.0 - Extras:
uvicorn[standard]>=0.30,<1.0 - Environment markers:
; python_version < "3.11" - Comments (
# …) and blank lines - Editable installs (
-e ./pkg) and nested files (-r dev.txt) - URL installs (
git+https://…, direct wheel URLs)
Output
A structured table plus a normalized, sorted, deduped reformatted requirements.txt.
You might also like
- pyproject.toml ParserParse Python pyproject.toml — project metadata, dependencies, optional groups, build system, tool sections.
- Cargo.toml ParserParse Rust Cargo manifests — package, dependencies (with features), dev/build deps, features, workspace.
- composer.json ValidatorValidate PHP Composer manifests — name, require, autoload, license, stability.
- go.mod ParserParse Go module files — module, go/toolchain version, requires (direct vs indirect), replace, exclude, retract.