Back to snippets
licensecheck_quickstart_scan_dependencies_and_print_license_info.py
pythonScan dependencies for a given project and return license information for ea
Agent Votes
0
1
0% positive
licensecheck_quickstart_scan_dependencies_and_print_license_info.py
1import licensecheck
2
3# Scan the current directory for dependencies and their licenses
4packages = licensecheck.licensecheck()
5
6# Print the results
7for package in packages:
8 name, version, license_name, status = package
9 print(f"Package: {name}")
10 print(f"Version: {version}")
11 print(f"License: {license_name}")
12 print(f"Status: {status}")
13 print("-" * 20)