Parses Pip requirement files
Project description
Requirements Parser
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
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
Close
Hashes for requirements-parser-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee2380a469ffe4067bc7f0096a6fcfb27539da7496fae12b74b8d5d0f33a4ee |
|
MD5 | e684113c5395439de87952df7affea38 |
|
BLAKE2b-256 | 2d45ed1be0fa777cbddd352e94f942e9acc26bba403091d98c86f5ce3780b344 |