dparse2


Namedparse2 JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/nexB/dparse2
SummaryA parser for Python dependency files
upload_time2022-12-23 17:41:53
maintainer
docs_urlNone
authororiginally from Jannis Gebauer, maintained by AboutCode.org
requires_python>=3.6
licenseMIT
keywords dparse pypi dependencies tox conda pipfile setup.cfg
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =================
Dependency Parser
=================


A parser for Python manifests and dependency files now at 
https://github.com/nexB/dparse2

Originally at https://github.com/pyupio/dparse

This is a maintained fork by some of the contributors since upstream stopped
updating this.


Supported Files
---------------

+------------------+------------+
| File             | parse      |
+==================+============+
| conda.yml        | yes        |
+------------------+------------+
| tox.ini          | yes        |
+------------------+------------+
| Pipfile          | yes        |
+------------------+------------+
| Pipfile.lock     | yes        |
+------------------+------------+

************
Installation
************

To install dparse2, run:

.. code-block:: console

    $ pip install dparse2

If you want to update Pipfiles, install the pipenv extra:

.. code-block:: console

    $ pip install dparse2[pipenv]

*****
Usage
*****

To use dparse2 in a Python project::

    from dparse2 import parse
    from dparse2 import filetypes

    content = """
    South==1.0.1 --hash=sha256:abcdefghijklmno
    pycrypto>=2.6
    """

    df = parse(content, file_type=filetypes.requirements_txt)

    print(df.json())


    {
      "file_type": "requirements.txt",
      "content": "\nSouth==1.0.1 --hash=sha256:abcdefghijklmno\npycrypto>=2.6\n",
      "path": null,
      "sha": null,
      "dependencies": [
        {
          "name": "South",
          "specs": [
            [
              "==",
              "1.0.1"
            ]
          ],
          "line": "South==1.0.1 --hash=sha256:abcdefghijklmno",
          "source": "pypi",
          "meta": {},
          "line_numbers": null,
          "index_server": null,
          "hashes": [
            "--hash=sha256:abcdefghijklmno"
          ],
          "dependency_type": "requirements.txt",
          "extras": []
        },
        {
          "name": "pycrypto",
          "specs": [
            [
              ">=",
              "2.6"
            ]
          ],
          "line": "pycrypto>=2.6",
          "source": "pypi",
          "meta": {},
          "line_numbers": null,
          "index_server": null,
          "hashes": [],
          "dependency_type": "requirements.txt",
          "extras": []
        }
      ]
    }



This tool supports Python 3.6 and up. Older version support older Python versions


==========
Changelog
==========

0.7.0
-------

* Use packvers instead of packaging



0.6.1 
-------

* Use non-deprecated ConfigParser method


0.6.0 
-------

* Fork from upstream dparse that is unresponsive
* Rename package to dparse2
* Fix security issue for GHSL-2021-111https://github.com/pyupio/dparse/issues/50
* Drop support for Python < 3.6 and add support for up to 3.10
* Drop support for updating requirements files
* format code with black, sort imports


0.5.1 (2020-04-26)
------------------

* Fixed package metadata removing 2.7 support
* Install pipenv only when asked for with extras

0.5.0 (2020-03-14)
------------------

A bug with this package allows it to be installed on Python 2.7 environments,
even though it should not work on such version. You should stick with version
0.4.1 version instead for Python 2.7 support.

* Dropped Python 2.7, 3.3, 3.4 support
* Removed six package
* Removed pinned dependencies of tests
* Dropped setup.py tests support in favor of tox

0.4.1 (2018-04-06)
------------------

* Fixed a packaging error.

0.4.0 (2018-04-06)
------------------

* pipenv is now an optional dependency that's only used when updating a Pipfile. Install it with dparse[pipenv]
* Added support for invalid toml Pipfiles (thanks @pombredanne)


0.3.0 (2018-03-01)
------------------

* Added support for setup.cfg files (thanks @kexepal)
* Dependencies from Pipfiles now include the section (thanks @paulortman)
* Multiline requirements are now ignored if they are marked
* Added experimental support for Pipfiles

0.2.1 (2017-07-19)
------------------

* Internal refactoring

0.2.0 (2017-07-19)
------------------

* Removed setuptools dependency


0.1.1 (2017-07-14)
------------------

* Fixed a bug that was causing the parser to throw errors on invalid requirements.

0.1.0 (2017-07-11)
------------------

* Initial, not much to see here.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nexB/dparse2",
    "name": "dparse2",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "dparse pypi dependencies tox conda pipfile setup.cfg",
    "author": "originally from Jannis Gebauer, maintained by AboutCode.org",
    "author_email": "info@nexb.com",
    "download_url": "https://files.pythonhosted.org/packages/dc/d2/59a42c7b40c1075d49aa6b5ea32a5baa87f8022d252ccb4762ca9d5a30f5/dparse2-0.7.0.tar.gz",
    "platform": null,
    "description": "=================\nDependency Parser\n=================\n\n\nA parser for Python manifests and dependency files now at \nhttps://github.com/nexB/dparse2\n\nOriginally at https://github.com/pyupio/dparse\n\nThis is a maintained fork by some of the contributors since upstream stopped\nupdating this.\n\n\nSupported Files\n---------------\n\n+------------------+------------+\n| File             | parse      |\n+==================+============+\n| conda.yml        | yes        |\n+------------------+------------+\n| tox.ini          | yes        |\n+------------------+------------+\n| Pipfile          | yes        |\n+------------------+------------+\n| Pipfile.lock     | yes        |\n+------------------+------------+\n\n************\nInstallation\n************\n\nTo install dparse2, run:\n\n.. code-block:: console\n\n    $ pip install dparse2\n\nIf you want to update Pipfiles, install the pipenv extra:\n\n.. code-block:: console\n\n    $ pip install dparse2[pipenv]\n\n*****\nUsage\n*****\n\nTo use dparse2 in a Python project::\n\n    from dparse2 import parse\n    from dparse2 import filetypes\n\n    content = \"\"\"\n    South==1.0.1 --hash=sha256:abcdefghijklmno\n    pycrypto>=2.6\n    \"\"\"\n\n    df = parse(content, file_type=filetypes.requirements_txt)\n\n    print(df.json())\n\n\n    {\n      \"file_type\": \"requirements.txt\",\n      \"content\": \"\\nSouth==1.0.1 --hash=sha256:abcdefghijklmno\\npycrypto>=2.6\\n\",\n      \"path\": null,\n      \"sha\": null,\n      \"dependencies\": [\n        {\n          \"name\": \"South\",\n          \"specs\": [\n            [\n              \"==\",\n              \"1.0.1\"\n            ]\n          ],\n          \"line\": \"South==1.0.1 --hash=sha256:abcdefghijklmno\",\n          \"source\": \"pypi\",\n          \"meta\": {},\n          \"line_numbers\": null,\n          \"index_server\": null,\n          \"hashes\": [\n            \"--hash=sha256:abcdefghijklmno\"\n          ],\n          \"dependency_type\": \"requirements.txt\",\n          \"extras\": []\n        },\n        {\n          \"name\": \"pycrypto\",\n          \"specs\": [\n            [\n              \">=\",\n              \"2.6\"\n            ]\n          ],\n          \"line\": \"pycrypto>=2.6\",\n          \"source\": \"pypi\",\n          \"meta\": {},\n          \"line_numbers\": null,\n          \"index_server\": null,\n          \"hashes\": [],\n          \"dependency_type\": \"requirements.txt\",\n          \"extras\": []\n        }\n      ]\n    }\n\n\n\nThis tool supports Python 3.6 and up. Older version support older Python versions\n\n\n==========\nChangelog\n==========\n\n0.7.0\n-------\n\n* Use packvers instead of packaging\n\n\n\n0.6.1 \n-------\n\n* Use non-deprecated ConfigParser method\n\n\n0.6.0 \n-------\n\n* Fork from upstream dparse that is unresponsive\n* Rename package to dparse2\n* Fix security issue for GHSL-2021-111https://github.com/pyupio/dparse/issues/50\n* Drop support for Python < 3.6 and add support for up to 3.10\n* Drop support for updating requirements files\n* format code with black, sort imports\n\n\n0.5.1 (2020-04-26)\n------------------\n\n* Fixed package metadata removing 2.7 support\n* Install pipenv only when asked for with extras\n\n0.5.0 (2020-03-14)\n------------------\n\nA bug with this package allows it to be installed on Python 2.7 environments,\neven though it should not work on such version. You should stick with version\n0.4.1 version instead for Python 2.7 support.\n\n* Dropped Python 2.7, 3.3, 3.4 support\n* Removed six package\n* Removed pinned dependencies of tests\n* Dropped setup.py tests support in favor of tox\n\n0.4.1 (2018-04-06)\n------------------\n\n* Fixed a packaging error.\n\n0.4.0 (2018-04-06)\n------------------\n\n* pipenv is now an optional dependency that's only used when updating a Pipfile. Install it with dparse[pipenv]\n* Added support for invalid toml Pipfiles (thanks @pombredanne)\n\n\n0.3.0 (2018-03-01)\n------------------\n\n* Added support for setup.cfg files (thanks @kexepal)\n* Dependencies from Pipfiles now include the section (thanks @paulortman)\n* Multiline requirements are now ignored if they are marked\n* Added experimental support for Pipfiles\n\n0.2.1 (2017-07-19)\n------------------\n\n* Internal refactoring\n\n0.2.0 (2017-07-19)\n------------------\n\n* Removed setuptools dependency\n\n\n0.1.1 (2017-07-14)\n------------------\n\n* Fixed a bug that was causing the parser to throw errors on invalid requirements.\n\n0.1.0 (2017-07-11)\n------------------\n\n* Initial, not much to see here.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A parser for Python dependency files",
    "version": "0.7.0",
    "split_keywords": [
        "dparse",
        "pypi",
        "dependencies",
        "tox",
        "conda",
        "pipfile",
        "setup.cfg"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "a5d1f9cb4c25de68c0604b2d4de5b37d",
                "sha256": "2b935161700cdad4f27fa7ada85900756739be65ba3ef614ac4436e7ba929102"
            },
            "downloads": -1,
            "filename": "dparse2-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a5d1f9cb4c25de68c0604b2d4de5b37d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 10887,
            "upload_time": "2022-12-23T17:41:51",
            "upload_time_iso_8601": "2022-12-23T17:41:51.247617Z",
            "url": "https://files.pythonhosted.org/packages/22/e9/a370e566f84807cff908e71a4824ae00ea8196319f4e2956e82509a5f1c6/dparse2-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ca3c76aad3efc9029c4b1f96f4cfa350",
                "sha256": "6bf6872aeaffedcac67ad0abb516630bad045dbdb58505b58d8f796ee91f0a73"
            },
            "downloads": -1,
            "filename": "dparse2-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ca3c76aad3efc9029c4b1f96f4cfa350",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 9916,
            "upload_time": "2022-12-23T17:41:53",
            "upload_time_iso_8601": "2022-12-23T17:41:53.531877Z",
            "url": "https://files.pythonhosted.org/packages/dc/d2/59a42c7b40c1075d49aa6b5ea32a5baa87f8022d252ccb4762ca9d5a30f5/dparse2-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-23 17:41:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "nexB",
    "github_project": "dparse2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "dparse2"
}
        
Elapsed time: 0.02144s