pip-preserve


Namepip-preserve JSON
Version 0.0.2.post1 PyPI version JSON
download
home_pageNone
SummaryOutput installed Python packages in requirements format, including also hashes of Python packages.
upload_time2023-04-05 10:58:55
maintainerNone
docs_urlNone
authorNone
requires_python>3.6
licenseNone
keywords packaging pip dependencies requirements
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pip-preserve
------------

Output installed Python packages in requirements format, including also hashes of Python packages

.. note::

  Note this tool requires pip with `PEP-710 <https://peps.python.org/pep-0710/>`__ support which is a draft PEP as of today. See FAQ bellow.

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

The tool can be `installed from GitHub <https://github.com/fridex/pip-preserve>`__:

.. code-block::

  pip install git+https://github.com/fridex/pip-preserve.git

You can also consume the `published package on PyPI (recommended) <https://pypi.org/project/pip-preserve/>`__:

.. code-block::

  pip install pip-preserve

Usage
=====

After the installation process is successfully done, ``pip-preserve`` CLI
is available:

.. code-block::

  pip-preserve --help

By default, the tool uses the current environment to find installed packages
and reconstruct a ``requirements.txt`` file:

.. code-block::

  $ pip-preserve --ignore-errors
  #
  # This file is autogenerated by pip-preserve version 0.0.1 with Python 3.9.13.
  #
  click==8.1.3 \
    --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48
  daiquiri==3.2.1 \
    --hash=sha256:b797a7ac94219dc26ef8ebf04f1f507eefa83a7d174e9eb41acc33e3ebf16f38
  # micropipenv==1.5.0 installed using a direct URL
  git+https://github.com/thoth-station/micropipenv@8176862ec96df23e152938659d6f45645246e398
  packaging==23.0 \
    --hash=sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2
  # pip==23.1.dev0 installed using a direct URL
  file:///Users/user/git/fridex/pip
  # pip-preserve==0.0.1 installed using a direct URL
  -e file:///Users/user/git/fridex/pip-preserve
  python-json-logger==2.0.7 \
    --hash=sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd

If you wish to obtain direct URLs of packages installed, you can pass
``--direct-url`` flag:

.. code-block::

  $ pip-preserve --direct-url --ignore-errors
  2023-04-05 12:36:26,168 [41348] WARNING  pip_preserve._lib: No provenance_url.json or direct_url.json found for 'setuptools' in version '58.1.0'
  2023-04-05 12:36:26,168 [41348] WARNING  pip_preserve._lib: The generated output will miss information from '/Users/user/git/fridex/pip-preserve/.venv/lib/python3.9/site-packages/setuptools-58.1.0.dist-info', please review any missing packages in the output
  #
  # This file is autogenerated by pip-preserve version 0.0.1 with Python 3.9.13.
  #
  https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl \
    --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48
  https://files.pythonhosted.org/packages/43/b0/b916172eee4e946dea7155ed969865c1b2c01c883101e33d1eb0c224a6a0/daiquiri-3.2.1-py3-none-any.whl \
    --hash=sha256:b797a7ac94219dc26ef8ebf04f1f507eefa83a7d174e9eb41acc33e3ebf16f38
  # micropipenv==1.5.0 installed using a direct URL
  git+https://github.com/thoth-station/micropipenv@8176862ec96df23e152938659d6f45645246e398
  https://files.pythonhosted.org/packages/ed/35/a31aed2993e398f6b09a790a181a7927eb14610ee8bbf02dc14d31677f1c/packaging-23.0-py3-none-any.whl \
    --hash=sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2
  # pip==23.1.dev0 installed using a direct URL
  file:///Users/user/git/fridex/pip
  # pip-preserve==0.0.1 installed using a direct URL
  -e file:///Users/user/git/fridex/pip-preserve
  https://files.pythonhosted.org/packages/35/a6/145655273568ee78a581e734cf35beb9e33a370b29c5d3c8fee3744de29f/python_json_logger-2.0.7-py3-none-any.whl \
    --hash=sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd

If the tool cannot determine from where a package was installed, it will fail.
This error can be ignored by supplying ``--ignore-errors`` flag. Any errors are
turned into warnings that can be reviewed once the tool prints results.

To explicitly point to a ``site-packages`` directory, use the ``--site-packages``
option.

To get more information about this tool, issue ``--help``.

FAQ
===

Q: The tool fails or I'm getting warnings similar to the one below and my
output is missing some packages:

.. code-block:: test

  No provenance_url.json or direct_url.json found

A: You most probably don't have pip with `PEP-710 support
<https://peps.python.org/pep-0710/>`__. Please install pip with PEP-710
support, for example using `this patch
<https://github.com/pypa/pip/pull/11865>`__ (experimental):

.. code-block::

  pip install git+https://github.com/fridex/pip.git@provenance-url

License
=======

See the LICENSE file.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pip-preserve",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">3.6",
    "maintainer_email": "Fridolin Pokorny <fridolin.pokorny@gmail.com>",
    "keywords": "packaging,pip,dependencies,requirements",
    "author": null,
    "author_email": "Fridolin Pokorny <fridolin.pokorny@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0c/64/85453d196cc521f83dc9ebe0e8ba7ce2ec9f53528f5714fd9fd2c7fc9fad/pip-preserve-0.0.2.post1.tar.gz",
    "platform": null,
    "description": "pip-preserve\n------------\n\nOutput installed Python packages in requirements format, including also hashes of Python packages\n\n.. note::\n\n  Note this tool requires pip with `PEP-710 <https://peps.python.org/pep-0710/>`__ support which is a draft PEP as of today. See FAQ bellow.\n\nInstallation\n============\n\nThe tool can be `installed from GitHub <https://github.com/fridex/pip-preserve>`__:\n\n.. code-block::\n\n  pip install git+https://github.com/fridex/pip-preserve.git\n\nYou can also consume the `published package on PyPI (recommended) <https://pypi.org/project/pip-preserve/>`__:\n\n.. code-block::\n\n  pip install pip-preserve\n\nUsage\n=====\n\nAfter the installation process is successfully done, ``pip-preserve`` CLI\nis available:\n\n.. code-block::\n\n  pip-preserve --help\n\nBy default, the tool uses the current environment to find installed packages\nand reconstruct a ``requirements.txt`` file:\n\n.. code-block::\n\n  $ pip-preserve --ignore-errors\n  #\n  # This file is autogenerated by pip-preserve version 0.0.1 with Python 3.9.13.\n  #\n  click==8.1.3 \\\n    --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48\n  daiquiri==3.2.1 \\\n    --hash=sha256:b797a7ac94219dc26ef8ebf04f1f507eefa83a7d174e9eb41acc33e3ebf16f38\n  # micropipenv==1.5.0 installed using a direct URL\n  git+https://github.com/thoth-station/micropipenv@8176862ec96df23e152938659d6f45645246e398\n  packaging==23.0 \\\n    --hash=sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2\n  # pip==23.1.dev0 installed using a direct URL\n  file:///Users/user/git/fridex/pip\n  # pip-preserve==0.0.1 installed using a direct URL\n  -e file:///Users/user/git/fridex/pip-preserve\n  python-json-logger==2.0.7 \\\n    --hash=sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd\n\nIf you wish to obtain direct URLs of packages installed, you can pass\n``--direct-url`` flag:\n\n.. code-block::\n\n  $ pip-preserve --direct-url --ignore-errors\n  2023-04-05 12:36:26,168 [41348] WARNING  pip_preserve._lib: No provenance_url.json or direct_url.json found for 'setuptools' in version '58.1.0'\n  2023-04-05 12:36:26,168 [41348] WARNING  pip_preserve._lib: The generated output will miss information from '/Users/user/git/fridex/pip-preserve/.venv/lib/python3.9/site-packages/setuptools-58.1.0.dist-info', please review any missing packages in the output\n  #\n  # This file is autogenerated by pip-preserve version 0.0.1 with Python 3.9.13.\n  #\n  https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl \\\n    --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48\n  https://files.pythonhosted.org/packages/43/b0/b916172eee4e946dea7155ed969865c1b2c01c883101e33d1eb0c224a6a0/daiquiri-3.2.1-py3-none-any.whl \\\n    --hash=sha256:b797a7ac94219dc26ef8ebf04f1f507eefa83a7d174e9eb41acc33e3ebf16f38\n  # micropipenv==1.5.0 installed using a direct URL\n  git+https://github.com/thoth-station/micropipenv@8176862ec96df23e152938659d6f45645246e398\n  https://files.pythonhosted.org/packages/ed/35/a31aed2993e398f6b09a790a181a7927eb14610ee8bbf02dc14d31677f1c/packaging-23.0-py3-none-any.whl \\\n    --hash=sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2\n  # pip==23.1.dev0 installed using a direct URL\n  file:///Users/user/git/fridex/pip\n  # pip-preserve==0.0.1 installed using a direct URL\n  -e file:///Users/user/git/fridex/pip-preserve\n  https://files.pythonhosted.org/packages/35/a6/145655273568ee78a581e734cf35beb9e33a370b29c5d3c8fee3744de29f/python_json_logger-2.0.7-py3-none-any.whl \\\n    --hash=sha256:f380b826a991ebbe3de4d897aeec42760035ac760345e57b812938dc8b35e2bd\n\nIf the tool cannot determine from where a package was installed, it will fail.\nThis error can be ignored by supplying ``--ignore-errors`` flag. Any errors are\nturned into warnings that can be reviewed once the tool prints results.\n\nTo explicitly point to a ``site-packages`` directory, use the ``--site-packages``\noption.\n\nTo get more information about this tool, issue ``--help``.\n\nFAQ\n===\n\nQ: The tool fails or I'm getting warnings similar to the one below and my\noutput is missing some packages:\n\n.. code-block:: test\n\n  No provenance_url.json or direct_url.json found\n\nA: You most probably don't have pip with `PEP-710 support\n<https://peps.python.org/pep-0710/>`__. Please install pip with PEP-710\nsupport, for example using `this patch\n<https://github.com/pypa/pip/pull/11865>`__ (experimental):\n\n.. code-block::\n\n  pip install git+https://github.com/fridex/pip.git@provenance-url\n\nLicense\n=======\n\nSee the LICENSE file.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Output installed Python packages in requirements format, including also hashes of Python packages.",
    "version": "0.0.2.post1",
    "split_keywords": [
        "packaging",
        "pip",
        "dependencies",
        "requirements"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fddbb94c8131a20065ee4f4450b8d6d86844cf68784efd024490e739bd967311",
                "md5": "1de99518940baf50b8f6a0da7b72847e",
                "sha256": "2f0a8c2b5c4724711b046ff506ccc2ffa010f21f81812ee51794920baf3c1901"
            },
            "downloads": -1,
            "filename": "pip_preserve-0.0.2.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1de99518940baf50b8f6a0da7b72847e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.6",
            "size": 8478,
            "upload_time": "2023-04-05T10:58:53",
            "upload_time_iso_8601": "2023-04-05T10:58:53.181650Z",
            "url": "https://files.pythonhosted.org/packages/fd/db/b94c8131a20065ee4f4450b8d6d86844cf68784efd024490e739bd967311/pip_preserve-0.0.2.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0c6485453d196cc521f83dc9ebe0e8ba7ce2ec9f53528f5714fd9fd2c7fc9fad",
                "md5": "5a784bf6afea037ada4eccb4376819d8",
                "sha256": "3b7ecb2064d293221f1bd7560ca2564af53620fb0b3cdeef9515644993f5ca6a"
            },
            "downloads": -1,
            "filename": "pip-preserve-0.0.2.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "5a784bf6afea037ada4eccb4376819d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.6",
            "size": 10578,
            "upload_time": "2023-04-05T10:58:55",
            "upload_time_iso_8601": "2023-04-05T10:58:55.278416Z",
            "url": "https://files.pythonhosted.org/packages/0c/64/85453d196cc521f83dc9ebe0e8ba7ce2ec9f53528f5714fd9fd2c7fc9fad/pip-preserve-0.0.2.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-05 10:58:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "pip-preserve"
}
        
Elapsed time: 0.05111s