Skip to main content

Log License

Project description

Log License

PyPI Downloads Status Python Version License

Read the documentation at https://loglicense.readthedocs.io/ Tests Codecov

pre-commit Black

A tool for helping developers staying compliant within their software projects. The tool crawls dependencies and logs their licenses, allowing to document and restrict certain licenses within a software project.

DISCLAIMER: There is no guarentee that all sublicenses or licenses will be identified and reported. For highest ensurance, use lock files to also catch sub-dependencies. However, this only looks within the given package manager, meaning C libraries and alike will not be reported here.

Features

  • Report and save log of licenses included in project
  • Check coverage of packages supported accepted licenses
  • Supporting pre-commits with coverage thresholds and allowing manual validation of unknown license types

Supported dependency files

Though the tool supports multiple file types, it is highly recommended to use lock files or do a ´pip freeze > requirements.txt´ in order to ensure all sub-dependencies are also evaluated for their license.

  • poetry.lock
  • uv.lock
  • pyproject.toml (traditional and poetry)
  • requirements.txt (--develop adds search for requirements_dev.txt)

Supported package managers

  • pypi

Installation

You can install Log License via pip from PyPI:

$ pip install loglicense

or using Poetry

$ poetry add loglicense

Quick example

Please see the Command-line Reference for details.

$ loglicense report path_to/poetry.lock

Example output:

| Name               | License                            |
|:-------------------|:-----------------------------------|
| click              | BSD-3-Clause                       |
| colorama           | BSD                                |
| importlib-metadata | Apache Software License            |
| pathlib            | MIT License                        |
| tabulate           | MIT                                |
| toml               | MIT                                |
| typer              | MIT License                        |
| typing-extensions  | Python Software Foundation License |
| zipp               | MIT License                        |

Alternatively you can let it search the executed directory for any supported file

$ loglicense report

Features to implement

  • Support npmjs package manager (and package.json/package-lock.json)
  • Support Pipfile, Pipfile.lock, conda.yaml, pip freeze

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the Apache 2.0 license, Log License is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

This project is greatly inspired by dep-license created by Abdulelah Bin Mahfoodh.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loglicense-0.1.14.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loglicense-0.1.14-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file loglicense-0.1.14.tar.gz.

File metadata

  • Download URL: loglicense-0.1.14.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loglicense-0.1.14.tar.gz
Algorithm Hash digest
SHA256 dfdf1fb684529f89294bfb45e463f5e8b06c02febf304d5f8b2d84cab73cee18
MD5 26b37a04b1e5874b287d3c70ba0d1135
BLAKE2b-256 d21ce42711e5aa15d303b9e199836bb98ae4ed01ff16786a9a467e2fbad08c3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for loglicense-0.1.14.tar.gz:

Publisher: release.yml on martincjespersen/loglicense

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file loglicense-0.1.14-py3-none-any.whl.

File metadata

  • Download URL: loglicense-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loglicense-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 224d40e7f422f9de8ccb0ec3fb1f1618fab3923d23acab7a29029aedd11357e4
MD5 4c39a942358eb5c5115094fa90909307
BLAKE2b-256 8c61c3bc2562fc08db49ac2e30eb9876879e48d93ac32c21d7b87bb08c61d2f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for loglicense-0.1.14-py3-none-any.whl:

Publisher: release.yml on martincjespersen/loglicense

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page