Skip to main content

Parses Pip requirement files

Project description

Requirements Parser

https://travis-ci.org/davidfischer/requirements-parser.svg?branch=master https://coveralls.io/repos/github/davidfischer/requirements-parser/badge.svg?branch=master 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.

Installation

pip install requirements-parser

Examples

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.name, 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+https://github.com/toastdriven/pyelasticsearch.git)

  • version control URIs

  • egg hashes and subdirectories (#egg=django-haystack&subdirectory=setup)

  • extras (DocParser[PDF])

  • URLs

Documentation

For more details and examples, the documentation is available at: http://requirements-parser.readthedocs.io.

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

Uploaded Source

Built Distribution

requirements_parser-0.2.0-py2-none-any.whl (8.1 kB view details)

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for requirements-parser-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5963ee895c2d05ae9f58d3fc641082fb38021618979d6a152b6b1398bd7d4ed4
MD5 49a94046805541ab1b654e14c61de5bc
BLAKE2b-256 0380eb6ba1dd0429089436e90e556db50884ea21da060b10f2e5668c4cac99da

See more details on using hashes here.

Provenance

File details

Details for the file requirements_parser-0.2.0-py2-none-any.whl.

File metadata

File hashes

Hashes for requirements_parser-0.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 76650b4a9d98fc65edf008a7920c076bb2a76c08eaae230ce4cfc6f51ea6a773
MD5 611b0cab139e9a35363ec4ffa1fe6c8c
BLAKE2b-256 27789d74d2b8cc27a3c1c1c560c67eaeee9a02a4335550515b70aef082ea66a7

See more details on using hashes here.

Provenance

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