pip-licenses-lib


Namepip-licenses-lib JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
SummaryRetrieve the software license list of Python packages installed with pip.
upload_time2024-06-03 15:40:37
maintainerNone
docs_urlNone
authorraimon49, stefan6419846 (library version)
requires_python<4,>=3.6
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 similar 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:

  * Use `dataclasses.dataclass` instead of a dictionary for each package information result.
  * 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 results.
  * 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 objects.

## 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": null,
    "name": "pip-licenses-lib",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.6",
    "maintainer_email": null,
    "keywords": "open source, license, package, dependency, licensing",
    "author": "raimon49, stefan6419846 (library version)",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/48/63/18d6acf095e32ec66a05df0c2bb5efcb297390cc4e4bc7cb5626c6e8a4f6/pip_licenses_lib-0.3.0.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 similar 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  * Use `dataclasses.dataclass` instead of a dictionary for each package information result.\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 results.\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 objects.\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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Retrieve the software license list of Python packages installed with pip.",
    "version": "0.3.0",
    "project_urls": {
        "Changelog": "https://github.com/stefan6419846/pip-licenses-lib/blob/master/CHANGELOG.md",
        "Documentation": "https://pip-licenses-lib.readthedocs.io",
        "Homepage": "https://github.com/stefan6419846/pip-licenses-lib",
        "Issues": "https://github.com/stefan6419846/pip-licenses-lib/issues",
        "Repository": "https://github.com/stefan6419846/pip-licenses-lib"
    },
    "split_keywords": [
        "open source",
        " license",
        " package",
        " dependency",
        " licensing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0b9614fbf868aeb7cda1f74821d7161258f1c8e0293e81ba4395551d27d9d84",
                "md5": "09a1cd0554d9097faf338ebc12a9e1a8",
                "sha256": "1298fd058aefca1d5d13a88037c29b729b7e9c4ae4a59e835a4720d5c82b9ef9"
            },
            "downloads": -1,
            "filename": "pip_licenses_lib-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "09a1cd0554d9097faf338ebc12a9e1a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.6",
            "size": 8622,
            "upload_time": "2024-06-03T15:40:36",
            "upload_time_iso_8601": "2024-06-03T15:40:36.142664Z",
            "url": "https://files.pythonhosted.org/packages/e0/b9/614fbf868aeb7cda1f74821d7161258f1c8e0293e81ba4395551d27d9d84/pip_licenses_lib-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "486318d6acf095e32ec66a05df0c2bb5efcb297390cc4e4bc7cb5626c6e8a4f6",
                "md5": "b4b3d77c1e19f832902cb1aeaad0b071",
                "sha256": "7f9be286e19d3be087f51c824483a8a601d27382bc8b2dc3e3523b1dec0e4576"
            },
            "downloads": -1,
            "filename": "pip_licenses_lib-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b4b3d77c1e19f832902cb1aeaad0b071",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.6",
            "size": 11853,
            "upload_time": "2024-06-03T15:40:37",
            "upload_time_iso_8601": "2024-06-03T15:40:37.999874Z",
            "url": "https://files.pythonhosted.org/packages/48/63/18d6acf095e32ec66a05df0c2bb5efcb297390cc4e4bc7cb5626c6e8a4f6/pip_licenses_lib-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-03 15:40:37",
    "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.32020s