Parses Pip requirement files
Project description
Requirements Parser
This is a small Python module for parsing Pip requirement files.
The goal is to parse everything in the Pip requirement file format spec.
Installation
pip install requirements-parser
Examples
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:
editables (-e git+https://github.com/toastdriven/pyelasticsearch.git)
version control URIs
egg hashes and subdirectories (#egg=django-haystack&subdirectory=setup)
extras (DocParser[PDF])
URLs
Documentation
For more details and examples, the documentation is available at: http://requirements-parser.readthedocs.io.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for requirements-parser-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5963ee895c2d05ae9f58d3fc641082fb38021618979d6a152b6b1398bd7d4ed4 |
|
MD5 | 49a94046805541ab1b654e14c61de5bc |
|
BLAKE2b-256 | 0380eb6ba1dd0429089436e90e556db50884ea21da060b10f2e5668c4cac99da |
Hashes for requirements_parser-0.2.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76650b4a9d98fc65edf008a7920c076bb2a76c08eaae230ce4cfc6f51ea6a773 |
|
MD5 | 611b0cab139e9a35363ec4ffa1fe6c8c |
|
BLAKE2b-256 | 27789d74d2b8cc27a3c1c1c560c67eaeee9a02a4335550515b70aef082ea66a7 |