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.0.6.tar.gz (4.8 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for requirements-parser-0.0.6.tar.gz
Algorithm Hash digest
SHA256 bee729ec83549d9a70973e2aa3c362a890f6c758087566dda157265050ebc024
MD5 f62efad453216baaa1b5faa0fac6a397
BLAKE2b-256 64c4b2e4fc467fc27b3c10e5300fa4dd3508642c0f0d91ce8e1c77eade901410

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