Skip to main content

Parses Pip requirement files

Project description

Requirements Parser

https://secure.travis-ci.org/davidfischer/requirements-parser.png?branch=master https://coveralls.io/repos/davidfischer/requirements-parser/badge.png

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

Installation

pip install requirements-parser

Examples

Requirements parser can parse a file-like object or a text string.

>>> import requirements
>>> reqfile = """
...     Django>=1.5,<1.6
...     DocParser[PDF]==1.0.0
...     """
>>> for req in requirements.parse(reqfile):
...     print(req.name, req.specs, req.extras)
...
('Django', [('>=', '1.5'), ('<', '1.6')], [])
('DocParser', [('==', '1.0.0')], ['pdf'])

Project details


Download files

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

Source Distribution

requirements-parser-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file requirements-parser-0.1.0.tar.gz.

File metadata

File hashes

Hashes for requirements-parser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fee2380a469ffe4067bc7f0096a6fcfb27539da7496fae12b74b8d5d0f33a4ee
MD5 e684113c5395439de87952df7affea38
BLAKE2b-256 2d45ed1be0fa777cbddd352e94f942e9acc26bba403091d98c86f5ce3780b344

See more details on using hashes here.

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