Metadata-Version: 2.1
Name: requirements-parser
Version: 0.9.0
Summary: This is a small Python module for parsing Pip requirement files.
Home-page: https://github.com/madpah/requirements-parser/#readme
License: Apache-2.0
Keywords: Pip,requirements,parse
Author: Paul Horton
Author-email: paul@hogr.dev
Maintainer: Paul Horton
Maintainer-email: paul@hogr.dev
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Software Distribution
Classifier: Typing :: Typed
Requires-Dist: types-setuptools (>=69.1.0)
Project-URL: Bug Tracker, https://github.com/madpah/requirements-parser/issues
Project-URL: Documentation, https://requirements-parser.readthedocs.io/
Project-URL: Repository, https://github.com/madpah/requirements-parser
Description-Content-Type: text/markdown

Requirements Parser
===================

[![Python CI](https://github.com/madpah/requirements-parser/actions/workflows/poetry.yml/badge.svg)](https://github.com/madpah/requirements-parser/actions/workflows/poetry.yml)
[![Documentation Status](http://readthedocs.org/projects/requirements-parser/badge/?version=latest)](http://requirements-parser.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

This is a small Python module for parsing [Pip](http://www.pip-installer.org/) requirement files.

The goal is to parse everything in the 
[Pip requirement file format](https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format) spec.

Installation
============

    pip install requirements-parser

or

    poetry add requirements-parser

Examples
========

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

``` {.python}
>>> 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]{.title-ref}`)
-   version control URIs
-   egg hashes and subdirectories (`[\#egg=django-haystack&subdirectory=setup]{.title-ref}`)
-   extras ([DocParser\[PDF\]]{.title-ref})
-   URLs

Documentation
=============

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


Change Log
==========

Change log is available on GitHub [here]()

