Name | legallint JSON |
Version |
1.1.0
JSON |
| download |
home_page | None |
Summary | LegalLint: A Multi-Language License Compliance Linter |
upload_time | 2024-10-12 14:23:59 |
maintainer | None |
docs_url | None |
author | Kiran Kumar Kotari |
requires_python | <4.0,>=3.8 |
license | Apache-2.0 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LegalLint
LegalLint is a license compliance linter for all programming languages, with current support for Python. It ensures that projects adhere to specified licensing policies, allowing users to enforce allowed licenses and trigger errors for disallowed licenses.
## Features
- Detects license types for Python libraries.
- Customizable allowed and disallowed licenses.
- Skips specific libraries from license checking.
- TOML-based configuration for flexible settings.
## Installation
To install LegalLint:
```bash
pip install legallint
```
## Usage
### CLI
```bash
$ legallint -l python
```
### Example Configuration (legallint.yaml)
```yaml
allowed_licenses:
- MIT
- Apache-2.0
- BSD-3-Clause
trigger_error_licenses:
- GPL-3.0
- AGPL-3.0
- Proprietary
- Unknown
skip_libraries:
```
### Example Configuration for python (pyproject.toml)
```toml
[licenses]
allowed = ["MIT", "Apache-2.0", "BSD-3-Clause"]
trigger_error = ["GPL-3.0", "AGPL-3.0", "Proprietary", "Unknown"]
# Libraries to skip
skip_libraries = ["example-lib1", "example-lib2"]
```
### Example legallint result
```bash
% legallint -l python
---------------
PYTHON
---------------
✔ iniconfig MIT
✔ requests Apache; Apache-2.0
✔ tomli MIT
✔ charset-normalizer MIT
✔ idna BSD
✔ exceptiongroup MIT
✔ pytest MIT
✔ pyyaml MIT
✔ pip MIT
‼ certifi MPL; MPL-2.0
✔ toml MIT
✔ pluggy MIT
✔ packaging BSD; Apache
✔ setuptools MIT
✔ urllib3 MIT
LegalLint: License compliance warning.
%
```
### legallint commands
```bash
$ legallint -h
usage: legallint [-h] [--verbose] [-v] [-l {python,node} [{python,node} ...]] [-u] [--license]
LegalLint is a cross-platform tool designed to ensure license compliance across multiple programming languages by analyzing dependencies and enforcing predefined license policies. LegalLint helps maintain legal standards by scanning the project’s dependencies and ensuring that only approved licenses (e.g., MIT, Apache 2.0) are used.
options:
-h, --help show this help message and exit
--verbose Enable verbose mode
-v, --version show program's version number and exit
-l {python,node} [{python,node} ...], --lang {python,node} [{python,node} ...]
Select one or more languages from: python
-u, --update Enable update mode
--license Enable license mode
```
## License
LegalLint is distributed under the Apache-2.0 License. See `LICENSE` for more information.
Raw data
{
"_id": null,
"home_page": null,
"name": "legallint",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Kiran Kumar Kotari",
"author_email": "kirankotari@live.com",
"download_url": "https://files.pythonhosted.org/packages/66/37/0060fec9b1cfee4a0a8759dcd933cb914c64c1b2d92f376d51556e250b7a/legallint-1.1.0.tar.gz",
"platform": null,
"description": "# LegalLint\n\nLegalLint is a license compliance linter for all programming languages, with current support for Python. It ensures that projects adhere to specified licensing policies, allowing users to enforce allowed licenses and trigger errors for disallowed licenses.\n\n## Features\n- Detects license types for Python libraries.\n- Customizable allowed and disallowed licenses.\n- Skips specific libraries from license checking.\n- TOML-based configuration for flexible settings.\n\n## Installation\nTo install LegalLint:\n```bash\npip install legallint\n```\n\n## Usage\n\n### CLI\n```bash\n$ legallint -l python\n```\n\n### Example Configuration (legallint.yaml)\n```yaml\nallowed_licenses:\n - MIT\n - Apache-2.0\n - BSD-3-Clause\n\ntrigger_error_licenses:\n - GPL-3.0\n - AGPL-3.0\n - Proprietary\n - Unknown\n\nskip_libraries:\n\n```\n### Example Configuration for python (pyproject.toml)\n```toml\n[licenses]\nallowed = [\"MIT\", \"Apache-2.0\", \"BSD-3-Clause\"]\ntrigger_error = [\"GPL-3.0\", \"AGPL-3.0\", \"Proprietary\", \"Unknown\"]\n\n# Libraries to skip\nskip_libraries = [\"example-lib1\", \"example-lib2\"]\n```\n\n### Example legallint result\n```bash\n% legallint -l python\n---------------\n PYTHON\n---------------\n\u2714 iniconfig MIT\n\u2714 requests Apache; Apache-2.0\n\u2714 tomli MIT\n\u2714 charset-normalizer MIT\n\u2714 idna BSD\n\u2714 exceptiongroup MIT\n\u2714 pytest MIT\n\u2714 pyyaml MIT\n\u2714 pip MIT\n\u203c certifi MPL; MPL-2.0\n\u2714 toml MIT\n\u2714 pluggy MIT\n\u2714 packaging BSD; Apache\n\u2714 setuptools MIT\n\u2714 urllib3 MIT\nLegalLint: License compliance warning.\n% \n```\n\n### legallint commands\n```bash\n$ legallint -h\nusage: legallint [-h] [--verbose] [-v] [-l {python,node} [{python,node} ...]] [-u] [--license]\n\nLegalLint is a cross-platform tool designed to ensure license compliance across multiple programming languages by analyzing dependencies and enforcing predefined license policies. LegalLint helps maintain legal standards by scanning the project\u2019s dependencies and ensuring that only approved licenses (e.g., MIT, Apache 2.0) are used.\n\noptions:\n -h, --help show this help message and exit\n --verbose Enable verbose mode\n -v, --version show program's version number and exit\n -l {python,node} [{python,node} ...], --lang {python,node} [{python,node} ...]\n Select one or more languages from: python\n -u, --update Enable update mode\n --license Enable license mode\n```\n\n## License\nLegalLint is distributed under the Apache-2.0 License. See `LICENSE` for more information.",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "LegalLint: A Multi-Language License Compliance Linter",
"version": "1.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0a61227ba8eb14f42ecaec3c4a6e3901a129c436363e4e3db50e5d29625b5e63",
"md5": "d38baafbd606b72f92b68ab2434949a2",
"sha256": "98a4712c1073403c4499c325aebf62af58b8cc24930efb98a2b7423afcc1c50a"
},
"downloads": -1,
"filename": "legallint-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d38baafbd606b72f92b68ab2434949a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 19195,
"upload_time": "2024-10-12T14:23:58",
"upload_time_iso_8601": "2024-10-12T14:23:58.777816Z",
"url": "https://files.pythonhosted.org/packages/0a/61/227ba8eb14f42ecaec3c4a6e3901a129c436363e4e3db50e5d29625b5e63/legallint-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "66370060fec9b1cfee4a0a8759dcd933cb914c64c1b2d92f376d51556e250b7a",
"md5": "3bdcbe7844e3db7a1054262ec96edf02",
"sha256": "8db295096bfacf594390780c0caeaa824162d3ad1abf50d6ec2d3fbdb7e9f414"
},
"downloads": -1,
"filename": "legallint-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3bdcbe7844e3db7a1054262ec96edf02",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 16491,
"upload_time": "2024-10-12T14:23:59",
"upload_time_iso_8601": "2024-10-12T14:23:59.737818Z",
"url": "https://files.pythonhosted.org/packages/66/37/0060fec9b1cfee4a0a8759dcd933cb914c64c1b2d92f376d51556e250b7a/legallint-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-12 14:23:59",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "legallint"
}