Skip to main content

Parses Pip requirement files

Project description

Requirements Parser Documentation Status

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


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.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+
  • version control URIs
  • egg hashes and subdirectories (#egg=django-haystack&subdirectory=setup)
  • extras (DocParser[PDF])
  • URLs


For more details and examples, the documentation is available at:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for requirements-parser, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size requirements_parser-0.2.0-py2-none-any.whl (8.1 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size requirements-parser-0.2.0.tar.gz (6.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page