requirements-parser


Namerequirements-parser JSON
Version 0.9.0 PyPI version JSON
download
home_pagehttps://github.com/madpah/requirements-parser/#readme
SummaryThis is a small Python module for parsing Pip requirement files.
upload_time2024-04-03 10:27:52
maintainerPaul Horton
docs_urlNone
authorPaul Horton
requires_python<4.0,>=3.8
licenseApache-2.0
keywords pip requirements parse
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            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]()


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/madpah/requirements-parser/#readme",
    "name": "requirements-parser",
    "maintainer": "Paul Horton",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": "paul@hogr.dev",
    "keywords": "Pip, requirements, parse",
    "author": "Paul Horton",
    "author_email": "paul@hogr.dev",
    "download_url": "https://files.pythonhosted.org/packages/db/83/396292f31f8a8ef806bb44e8a50e087f84287b670390a9d9a8d3d34f7752/requirements_parser-0.9.0.tar.gz",
    "platform": null,
    "description": "Requirements Parser\n===================\n\n[![Python CI](https://github.com/madpah/requirements-parser/actions/workflows/poetry.yml/badge.svg)](https://github.com/madpah/requirements-parser/actions/workflows/poetry.yml)\n[![Documentation Status](http://readthedocs.org/projects/requirements-parser/badge/?version=latest)](http://requirements-parser.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nThis is a small Python module for parsing [Pip](http://www.pip-installer.org/) requirement files.\n\nThe goal is to parse everything in the \n[Pip requirement file format](https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format) spec.\n\nInstallation\n============\n\n    pip install requirements-parser\n\nor\n\n    poetry add requirements-parser\n\nExamples\n========\n\nRequirements parser can parse a file-like object or a text string.\n\n``` {.python}\n>>> import requirements\n>>> with open('requirements.txt', 'r') as fd:\n...     for req in requirements.parse(fd):\n...         print(req.name, req.specs)\nDjango [('>=', '1.11'), ('<', '1.12')]\nsix [('==', '1.10.0')]\n```\n\nIt can handle most if not all of the options in requirement files that\ndo not involve traversing the local filesystem. These include:\n\n-   editables (`-e git+https://github.com/toastdriven/pyelasticsearch.git]{.title-ref}`)\n-   version control URIs\n-   egg hashes and subdirectories (`[\\#egg=django-haystack&subdirectory=setup]{.title-ref}`)\n-   extras ([DocParser\\[PDF\\]]{.title-ref})\n-   URLs\n\nDocumentation\n=============\n\nFor more details and examples, the documentation is available at:\n<http://requirements-parser.readthedocs.io>.\n\n\nChange Log\n==========\n\nChange log is available on GitHub [here]()\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "This is a small Python module for parsing Pip requirement files.",
    "version": "0.9.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/madpah/requirements-parser/issues",
        "Documentation": "https://requirements-parser.readthedocs.io/",
        "Homepage": "https://github.com/madpah/requirements-parser/#readme",
        "Repository": "https://github.com/madpah/requirements-parser"
    },
    "split_keywords": [
        "pip",
        " requirements",
        " parse"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d2ed83d239cbf8a18f9400de46b9204c2fa8899f9347e771009aafb27858def",
                "md5": "85a9effbde37a1bed90a19de2960dcbd",
                "sha256": "40298fd2bb423798fc52ca4550adf1944d75c998fd2316b5b6959842dbc70a32"
            },
            "downloads": -1,
            "filename": "requirements_parser-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "85a9effbde37a1bed90a19de2960dcbd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 14010,
            "upload_time": "2024-04-03T10:27:50",
            "upload_time_iso_8601": "2024-04-03T10:27:50.819830Z",
            "url": "https://files.pythonhosted.org/packages/2d/2e/d83d239cbf8a18f9400de46b9204c2fa8899f9347e771009aafb27858def/requirements_parser-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db83396292f31f8a8ef806bb44e8a50e087f84287b670390a9d9a8d3d34f7752",
                "md5": "f7824ef211e35209a650c87f69a0e58c",
                "sha256": "588f587ab76732d59df4c64bd81f1b4a4f1aaaa9b3eb7ad4f5890685446f03e8"
            },
            "downloads": -1,
            "filename": "requirements_parser-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f7824ef211e35209a650c87f69a0e58c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 21997,
            "upload_time": "2024-04-03T10:27:52",
            "upload_time_iso_8601": "2024-04-03T10:27:52.547973Z",
            "url": "https://files.pythonhosted.org/packages/db/83/396292f31f8a8ef806bb44e8a50e087f84287b670390a9d9a8d3d34f7752/requirements_parser-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-03 10:27:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "madpah",
    "github_project": "requirements-parser",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "requirements-parser"
}
        
Elapsed time: 0.22283s