reuse.download module
Functions for downloading license files from spdx/license-data-list.
- reuse.download.download_license(spdx_identifier: str) str [source]
Download the license text from the SPDX repository.
- Parameters:
spdx_identifier – SPDX identifier of the license.
- Raises:
requests.RequestException – if the license could not be downloaded.
- Returns:
The license text.
- reuse.download.put_license_in_file(spdx_identifier: str, destination: PathLike) None [source]
Download a license and put it in the destination file.
This function exists solely for convenience.
- Parameters:
spdx_identifier – SPDX License Identifier of the license.
destination – Where to put the license.
- Raises:
requests.RequestException – if the license could not be downloaded.
FileExistsError – if the license file already exists.