Name | dparse JSON |
Version |
0.6.4
JSON |
| download |
home_page | None |
Summary | A parser for Python dependency files |
upload_time | 2024-11-08 16:52:06 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT license |
keywords |
dparse
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
No coveralls.
|
=================
Dependency Parser
=================
.. image:: https://img.shields.io/pypi/v/dparse.svg
:target: https://pypi.python.org/pypi/dparse
.. image:: https://img.shields.io/travis/pyupio/dparse.svg
:target: https://travis-ci.org/pyupio/dparse
.. image:: https://codecov.io/gh/pyupio/dparse/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pyupio/dparse
A parser for Python dependency files
Supported Files
---------------
+------------------+------------+-----------+
| File | parse | update |
+==================+============+===========+
| requirements.txt | yes | yes |
+------------------+------------+-----------+
| conda.yml | yes | yes |
+------------------+------------+-----------+
| tox.ini | yes | yes |
+------------------+------------+-----------+
| Pipfile | yes | yes |
+------------------+------------+-----------+
| Pipfile.lock | yes | yes |
+------------------+------------+-----------+
| poetry.lock | yes | no |
+------------------+------------+-----------+
| setup.py | no (# 2_) | no (# 2_) |
+------------------+------------+-----------+
| zc.buildout | no (# 3_) | no (# 3_) |
+------------------+------------+-----------+
| setup.cfg | no (# 4_) | no (# 4_) |
+------------------+------------+-----------+
| pyproject.toml | yes | no |
+------------------+------------+-----------+
.. _2: https://github.com/pyupio/dparse/issues/2
.. _3: https://github.com/pyupio/dparse/issues/3
.. _4: https://github.com/pyupio/dparse/issues/8
************
Installation
************
To install dparse, run:
.. code-block:: console
$ pip install dparse
If you want to update Pipfiles, install the pipenv extra:
.. code-block:: console
$ pip install dparse[pipenv]
If you want to parse conda YML files, install the conda extra:
.. code-block:: console
$ pip install dparse[conda]
*****
Usage
*****
To use dparse in a Python project::
from dparse import parse, 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": []
}
]
}
**********
Python 2.7
**********
This tool requires latest Python patch versions starting with version 3.5. We
did support Python 2.7 in the past but, as for other Python 3.x minor versions,
it reached its End-Of-Life and as such we are not able to support it anymore.
We understand you might still have Python 2.7 projects running. At the same
time, Safety itself has a commitment to encourage developers to keep their
software up-to-date, and it would not make sense for us to work with officially
unsupported Python versions, or even those that reached their end of life.
If you still need to use Safety with Python 2.7, please use version 0.4.1 of
Dparse available at PyPi. Alternatively, you can run Safety from a Python 3
environment to check the requirements file for your Python 2.7 project.
Raw data
{
"_id": null,
"home_page": null,
"name": "dparse",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "dparse",
"author": null,
"author_email": "Jannis Gebauer <support@pyup.io>",
"download_url": "https://files.pythonhosted.org/packages/29/ee/96c65e17222b973f0d3d0aa9bad6a59104ca1b0eb5b659c25c2900fccd85/dparse-0.6.4.tar.gz",
"platform": null,
"description": "=================\nDependency Parser\n=================\n\n\n.. image:: https://img.shields.io/pypi/v/dparse.svg\n :target: https://pypi.python.org/pypi/dparse\n\n.. image:: https://img.shields.io/travis/pyupio/dparse.svg\n :target: https://travis-ci.org/pyupio/dparse\n\n.. image:: https://codecov.io/gh/pyupio/dparse/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/pyupio/dparse\n\n\nA parser for Python dependency files\n\n\nSupported Files\n---------------\n\n+------------------+------------+-----------+\n| File | parse | update |\n+==================+============+===========+\n| requirements.txt | yes | yes |\n+------------------+------------+-----------+\n| conda.yml | yes | yes |\n+------------------+------------+-----------+\n| tox.ini | yes | yes |\n+------------------+------------+-----------+\n| Pipfile | yes | yes |\n+------------------+------------+-----------+\n| Pipfile.lock | yes | yes |\n+------------------+------------+-----------+\n| poetry.lock | yes | no |\n+------------------+------------+-----------+\n| setup.py | no (# 2_) | no (# 2_) |\n+------------------+------------+-----------+\n| zc.buildout | no (# 3_) | no (# 3_) |\n+------------------+------------+-----------+\n| setup.cfg | no (# 4_) | no (# 4_) |\n+------------------+------------+-----------+\n| pyproject.toml | yes | no |\n+------------------+------------+-----------+\n\n.. _2: https://github.com/pyupio/dparse/issues/2\n.. _3: https://github.com/pyupio/dparse/issues/3\n.. _4: https://github.com/pyupio/dparse/issues/8\n\n************\nInstallation\n************\n\nTo install dparse, run:\n\n.. code-block:: console\n\n $ pip install dparse\n\nIf you want to update Pipfiles, install the pipenv extra:\n\n.. code-block:: console\n\n $ pip install dparse[pipenv]\n\nIf you want to parse conda YML files, install the conda extra:\n\n.. code-block:: console\n\n $ pip install dparse[conda]\n\n*****\nUsage\n*****\n\nTo use dparse in a Python project::\n\n from dparse import parse, 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\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**********\nPython 2.7\n**********\n\nThis tool requires latest Python patch versions starting with version 3.5. We\ndid support Python 2.7 in the past but, as for other Python 3.x minor versions,\nit reached its End-Of-Life and as such we are not able to support it anymore.\n\nWe understand you might still have Python 2.7 projects running. At the same\ntime, Safety itself has a commitment to encourage developers to keep their\nsoftware up-to-date, and it would not make sense for us to work with officially\nunsupported Python versions, or even those that reached their end of life.\n\nIf you still need to use Safety with Python 2.7, please use version 0.4.1 of\nDparse available at PyPi. Alternatively, you can run Safety from a Python 3\nenvironment to check the requirements file for your Python 2.7 project.\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "A parser for Python dependency files",
"version": "0.6.4",
"project_urls": {
"Homepage": "https://github.com/pyupio/dparse"
},
"split_keywords": [
"dparse"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5626035d1c308882514a1e6ddca27f9d3e570d67a0e293e7b4d910a70c8fe32b",
"md5": "679389de668bc24b2de55504ebbba5c6",
"sha256": "fbab4d50d54d0e739fbb4dedfc3d92771003a5b9aa8545ca7a7045e3b174af57"
},
"downloads": -1,
"filename": "dparse-0.6.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "679389de668bc24b2de55504ebbba5c6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 11925,
"upload_time": "2024-11-08T16:52:03",
"upload_time_iso_8601": "2024-11-08T16:52:03.844448Z",
"url": "https://files.pythonhosted.org/packages/56/26/035d1c308882514a1e6ddca27f9d3e570d67a0e293e7b4d910a70c8fe32b/dparse-0.6.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "29ee96c65e17222b973f0d3d0aa9bad6a59104ca1b0eb5b659c25c2900fccd85",
"md5": "c777f829afa4f7f3119c089168485275",
"sha256": "90b29c39e3edc36c6284c82c4132648eaf28a01863eb3c231c2512196132201a"
},
"downloads": -1,
"filename": "dparse-0.6.4.tar.gz",
"has_sig": false,
"md5_digest": "c777f829afa4f7f3119c089168485275",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 27912,
"upload_time": "2024-11-08T16:52:06",
"upload_time_iso_8601": "2024-11-08T16:52:06.444842Z",
"url": "https://files.pythonhosted.org/packages/29/ee/96c65e17222b973f0d3d0aa9bad6a59104ca1b0eb5b659c25c2900fccd85/dparse-0.6.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-08 16:52:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pyupio",
"github_project": "dparse",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "dparse"
}