This commit is contained in:
Iliyan Angelov
2025-12-01 06:50:10 +02:00
parent 91f51bc6fe
commit 62c1fe5951
4682 changed files with 544807 additions and 31208 deletions

View File

@@ -0,0 +1,187 @@
Metadata-Version: 2.3
Name: dparse
Version: 0.6.4
Summary: A parser for Python dependency files
Project-URL: Homepage, https://github.com/pyupio/dparse
Author-email: Jannis Gebauer <support@pyup.io>
License: MIT license
License-File: LICENSE
Keywords: dparse
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
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
Requires-Python: >=3.7
Requires-Dist: packaging
Requires-Dist: tomli; python_version < '3.11'
Provides-Extra: all
Requires-Dist: pipenv; extra == 'all'
Requires-Dist: poetry; extra == 'all'
Requires-Dist: pyyaml; extra == 'all'
Provides-Extra: conda
Requires-Dist: pyyaml; extra == 'conda'
Provides-Extra: pipenv
Requires-Dist: pipenv; extra == 'pipenv'
Provides-Extra: poetry
Requires-Dist: poetry; extra == 'poetry'
Description-Content-Type: text/x-rst
=================
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.

View File

@@ -0,0 +1,19 @@
dparse-0.6.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
dparse-0.6.4.dist-info/METADATA,sha256=4YyoNiV-BvH7TQxl2YuqkepPYU-DB8ascXElN7dy4ik,5456
dparse-0.6.4.dist-info/RECORD,,
dparse-0.6.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
dparse-0.6.4.dist-info/licenses/LICENSE,sha256=ar0PbA_0X4CQeStmtJmu5WMr9t8_geMafO3DNpZatu4,1074
dparse/__init__.py,sha256=97ohr3g1hWbpFJ6gZjHDyIYFhWaloxrH1UzcCbNsE88,169
dparse/__pycache__/__init__.cpython-312.pyc,,
dparse/__pycache__/dependencies.cpython-312.pyc,,
dparse/__pycache__/errors.cpython-312.pyc,,
dparse/__pycache__/filetypes.cpython-312.pyc,,
dparse/__pycache__/parser.cpython-312.pyc,,
dparse/__pycache__/regex.cpython-312.pyc,,
dparse/__pycache__/updater.cpython-312.pyc,,
dparse/dependencies.py,sha256=g8gE1FfVignhXv16QckS1pr119smnknVAZ9gr1164Rg,6654
dparse/errors.py,sha256=4EI-PEu0pe1I1_weZ6sZq8SPwR9uf1GKwMq6eFhV2hE,434
dparse/filetypes.py,sha256=taMOUPtB-xp0z1e3NEvfaySfjHKTUKMP5lG6w7BMYEY,218
dparse/parser.py,sha256=5Dwj4U3GgVLiit9_hrSgFs3KFI6JjJ3NMg79STrOB_k,17680
dparse/regex.py,sha256=WXIxYG5cmO4ts2MuGDN9qUENtij4AXkmgpPsMmWXgag,35
dparse/updater.py,sha256=nM0QtAPHqeLuoLpS6v6CdZOfxVQNYCIRXEWOsuWczVw,4699

View File

@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: hatchling 1.25.0
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,11 @@
MIT License
Copyright (c) 2017, Jannis Gebauer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.