pip-licenses-lib


Namepip-licenses-lib JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/stefan6419846/pip-licenses-lib
SummaryRetrieve the software license list of Python packages installed with pip.
upload_time2023-11-09 08:29:27
maintainer
docs_urlNone
authorstefan6419846
requires_python>=3.6, <4
licenseMIT
keywords open source license package dependency licensing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pip-licenses Library

Retrieve the software license list of Python packages installed with *pip*.

## About

This package is a fork of the great [pip-licenses](https://github.com/raimon49/pip-licenses) tool, which provides a CLI with similiar functionality. For now, *pip-licenses* itself mostly focuses on the CLI part; while library-based access is possible, some interesting methods for further reuse are nested and therefore hidden inside the corresponding API.

While there have been some attempts to provide similar features in the upstream repository, they are not available inside the official package at the moment, while I needed a short-term solution. Examples:

* In May 2021, a package structure has been introduced by [#88](https://github.com/raimon49/pip-licenses/pull/88). In August 2023, this is still only available on a `dev-4.0.0` branch, while version 4.0.0 has been released in November 2022.
* In October 2020, the PR [#78](https://github.com/raimon49/pip-licenses/pull/78) for handling multiple license files has been closed to maybe include it in the future, which has not yet happened.

As parsing the license data of packages as provided by the maintainers is at least some first hint regarding the license status, I decided to create this fork with the required modifications and enhancements to suit my current needs.

## Differences to pip-licenses

Changes compared to original version:

  * Enable support for Python < 3.8 by using the `importlib_metadata` backport and dropping support for the new annotations behaviour for now.
  * Remove all output/rendering functionality.
  * Move all methods to the top level.
  * Always return all copyright and notice file matches.
  * Always return the system packages as well.
  * Include the license names and distribution object inside the result dictionary.
  * Do not use abbreviations for naming purposes.
  * Rewrite tests to use plain *unittest* functionality.
  * Add option to skip retrieving license and notice files for faster version-only checks.

## Installation

You can install this package from PyPI:

```bash
python -m pip install pip-licenses-lib
```

Alternatively, you can use the package from source directly after installing the required dependencies.

## Usage

The main entry point is `piplicenses_lib.get_packages()`, which will yield a list of package data dictionaries.

## License

This package is subject to the terms of the MIT license.

## Disclaimer

All results are generated automatically from the data supplied by the corresponding package maintainers and provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. No generated content should be considered or used as legal advice. Consult an Attorney for any legal advice.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stefan6419846/pip-licenses-lib",
    "name": "pip-licenses-lib",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6, <4",
    "maintainer_email": "",
    "keywords": "open source,license,package,dependency,licensing",
    "author": "stefan6419846",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/19/7c/d3ed42e243e2d6ca0c7f345e1e805af5eb86195f09f40a31487d432405ba/pip-licenses-lib-0.2.1.tar.gz",
    "platform": null,
    "description": "# pip-licenses Library\n\nRetrieve the software license list of Python packages installed with *pip*.\n\n## About\n\nThis package is a fork of the great [pip-licenses](https://github.com/raimon49/pip-licenses) tool, which provides a CLI with similiar functionality. For now, *pip-licenses* itself mostly focuses on the CLI part; while library-based access is possible, some interesting methods for further reuse are nested and therefore hidden inside the corresponding API.\n\nWhile there have been some attempts to provide similar features in the upstream repository, they are not available inside the official package at the moment, while I needed a short-term solution. Examples:\n\n* In May 2021, a package structure has been introduced by [#88](https://github.com/raimon49/pip-licenses/pull/88). In August 2023, this is still only available on a `dev-4.0.0` branch, while version 4.0.0 has been released in November 2022.\n* In October 2020, the PR [#78](https://github.com/raimon49/pip-licenses/pull/78) for handling multiple license files has been closed to maybe include it in the future, which has not yet happened.\n\nAs parsing the license data of packages as provided by the maintainers is at least some first hint regarding the license status, I decided to create this fork with the required modifications and enhancements to suit my current needs.\n\n## Differences to pip-licenses\n\nChanges compared to original version:\n\n  * Enable support for Python < 3.8 by using the `importlib_metadata` backport and dropping support for the new annotations behaviour for now.\n  * Remove all output/rendering functionality.\n  * Move all methods to the top level.\n  * Always return all copyright and notice file matches.\n  * Always return the system packages as well.\n  * Include the license names and distribution object inside the result dictionary.\n  * Do not use abbreviations for naming purposes.\n  * Rewrite tests to use plain *unittest* functionality.\n  * Add option to skip retrieving license and notice files for faster version-only checks.\n\n## Installation\n\nYou can install this package from PyPI:\n\n```bash\npython -m pip install pip-licenses-lib\n```\n\nAlternatively, you can use the package from source directly after installing the required dependencies.\n\n## Usage\n\nThe main entry point is `piplicenses_lib.get_packages()`, which will yield a list of package data dictionaries.\n\n## License\n\nThis package is subject to the terms of the MIT license.\n\n## Disclaimer\n\nAll results are generated automatically from the data supplied by the corresponding package maintainers and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. No generated content should be considered or used as legal advice. Consult an Attorney for any legal advice.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Retrieve the software license list of Python packages installed with pip.",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/stefan6419846/pip-licenses-lib"
    },
    "split_keywords": [
        "open source",
        "license",
        "package",
        "dependency",
        "licensing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5991afdf56bab3723a69575a3ccac6ab225809fab91fc57637c5474781720669",
                "md5": "d64319b9717cfc50ab5addd713640e25",
                "sha256": "c4fda7966e0211a3eef8d36edfabc8eb50d108d771183b1b38820a5bdd42f0b5"
            },
            "downloads": -1,
            "filename": "pip_licenses_lib-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d64319b9717cfc50ab5addd713640e25",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6, <4",
            "size": 8078,
            "upload_time": "2023-11-09T08:29:26",
            "upload_time_iso_8601": "2023-11-09T08:29:26.839379Z",
            "url": "https://files.pythonhosted.org/packages/59/91/afdf56bab3723a69575a3ccac6ab225809fab91fc57637c5474781720669/pip_licenses_lib-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "197cd3ed42e243e2d6ca0c7f345e1e805af5eb86195f09f40a31487d432405ba",
                "md5": "894b7894109c17018db95c08b8752ac5",
                "sha256": "3c6f5fcb620ef8eca1ebaf9f9b5c71186614d12e3030bc52f33bc61ae0d031ff"
            },
            "downloads": -1,
            "filename": "pip-licenses-lib-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "894b7894109c17018db95c08b8752ac5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6, <4",
            "size": 10413,
            "upload_time": "2023-11-09T08:29:27",
            "upload_time_iso_8601": "2023-11-09T08:29:27.983712Z",
            "url": "https://files.pythonhosted.org/packages/19/7c/d3ed42e243e2d6ca0c7f345e1e805af5eb86195f09f40a31487d432405ba/pip-licenses-lib-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-09 08:29:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "stefan6419846",
    "github_project": "pip-licenses-lib",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pip-licenses-lib"
}
        
Elapsed time: 0.14349s