--- id: requirements-parser version: "0.13.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # requirements-parser — This is a small Python module for parsing Pip requirement files. License: permissive · Maintenance: active · Downloads: 17.8M/mo ## What it is and what it does requirements-parser is a lightweight Python module that reads and parses pip requirement files—the text files that list project dependencies—into structured objects you can inspect programmatically. It accepts either a file-like object or a string and extracts package names, version constraints, and metadata like extras, URLs, and version control references. The module handles most pip requirement file syntax including editables, version control URIs, egg hashes, subdirectories, and extras. It has a single runtime dependency on packaging and supports Python 3.8 through 3.14. The project is actively maintained and has been in use since its initial release in 2013. Use it for: - Programmatically inspect and validate requirements.txt files in build or deployment scripts - Extract dependency metadata for dependency analysis or auditing tools - Parse requirements files to generate reports or migrate dependencies between formats - Validate requirement syntax before installation in CI/CD pipelines - Build tools that need to understand pip dependency specifications ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses pip requirement files into structured data, extracting package names, version specifiers, and metadata like extras, URLs, and version control references. Yes. This is a stable, actively maintained parser with low install friction and no known vulnerabilities. Use it when you need to programmatically read and inspect pip requirement files rather than parsing them manually or with regex. ## Install pip install requirements-parser uv add requirements-parser poetry add requirements-parser ## Installing requirements-parser Before you install: Low friction install with a single runtime dependency (packaging). Actively maintained with a recent release; repository is not archived and has received commits within the last two months. License in practice: Licensed under Apache 2.0 (permissive), allowing modification and redistribution with minimal restrictions—suitable for both open-source and commercial use. Quickstart: pip install requirements-parser import requirements with open('requirements.txt', 'r') as fd: for req in requirements.parse(fd): print(req.name, req.specs) Verify before relying: - Whether the parser handles all edge cases in the current pip requirement file format specification - Performance characteristics when parsing very large requirement files ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 17.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags parse pip requirements files, requirement file parser, extract package dependencies, pip requirements parsing, parse requirements.txt, dependency specification parser, pip format parser, dependency-parsing, pip-tools [View on SkillFed](https://skillfed.io/packages/requirements-parser) · [View on PyPI](https://pypi.org/project/requirements-parser/)