Skip to main content

Parses Pip requirement files

Project description

Reqfile Parser

https://secure.travis-ci.org/davidfischer/reqfile-parser.png?branch=master

This is a small Python module for parsing Pip requirement files.

Examples

Reqfile Parser can parse a file-like object or a text string.

>>> import reqfileparser
>>> import pprint
>>> with open('requirements.txt', 'rb') as f:
...     pprint.pprint(reqfileparser.parse(f)))
[{'extras': None, 'name': 'requests', 'operator': '>=', 'version': '0.14.1'},
 {'extras': None, 'name': 'requests-oath2', 'operator': None, 'version': None},
 {'extras': None, 'name': 'Django', 'operator': '==', 'version': '1.4.2'}]

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page