
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
requirements-parser
Advanced tools
This is a small Python module for parsing Pip requirement files.
The goal is to parse everything in the Pip requirement file format spec.
pip install requirements-parser
or
poetry add requirements-parser
requirements-parser can parse a file-like object or a text string.
>>> import requirements
>>> with open('requirements.txt', 'r') as fd:
... for req in requirements.parse(fd):
... print(req.name, req.specs)
Django [('>=', '1.11'), ('<', '1.12')]
six [('==', '1.10.0')]
It can handle most (if not all) of the options in requirement files that do not involve traversing the local filesystem. These include:
-e git+https://github.com/toastdriven/pyelasticsearch.git]{.title-ref})[\#egg=django-haystack&subdirectory=setup]{.title-ref})View the documentation here.
We endeavour to support all functionality for all current actively supported Python versions. However, some features may not be possible/present in older Python versions due to their lack of support.
See our CHANGELOG.
Feel free to open issues, bugreports or pull requests.
See the CONTRIBUTING file for details.
requirements-parser was originally written by @davidfischer and is now maintained by @madpah. See Authors for full details.
Permission to modify and redistribute is granted under the terms of the Apache 2.0 license.
See the LICENSE file for the full license.
FAQs
This is a small Python module for parsing Pip requirement files.
We found that requirements-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.