{"id":33117645,"url":"https://github.com/ftpsolutions/python-third-party-license-file-generator","last_synced_at":"2026-01-16T11:18:19.304Z","repository":{"id":43471449,"uuid":"129858508","full_name":"ftpsolutions/python-third-party-license-file-generator","owner":"ftpsolutions","description":"A tool that walks your Python project's requirements and gathers the third party licenses for you","archived":false,"fork":false,"pushed_at":"2025-12-31T06:42:02.000Z","size":202,"stargazers_count":16,"open_issues_count":1,"forks_count":5,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-04T07:58:31.360Z","etag":null,"topics":["licenses","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ftpsolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-04-17T06:42:11.000Z","updated_at":"2025-12-31T06:41:31.000Z","dependencies_parsed_at":"2024-08-23T04:44:01.401Z","dependency_job_id":"22410dba-320a-4cde-be2c-160f77321cc8","html_url":"https://github.com/ftpsolutions/python-third-party-license-file-generator","commit_stats":{"total_commits":30,"total_committers":8,"mean_commits":3.75,"dds":0.5,"last_synced_commit":"3c14a4af568bb7af71b9eb7668e7c35fbe74972e"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/ftpsolutions/python-third-party-license-file-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftpsolutions%2Fpython-third-party-license-file-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftpsolutions%2Fpython-third-party-license-file-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftpsolutions%2Fpython-third-party-license-file-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftpsolutions%2Fpython-third-party-license-file-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftpsolutions","download_url":"https://codeload.github.com/ftpsolutions/python-third-party-license-file-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftpsolutions%2Fpython-third-party-license-file-generator/sbom","scorecard":{"id":413047,"data":{"date":"2025-08-11","repo":{"name":"github.com/ftpsolutions/python-third-party-license-file-generator","commit":"8b0d756a1c10f72904705ef3e6780d727eea6b2e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":3,"reason":"Found 6/20 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:3","Warn: pipCommand not pinned by hash: Dockerfile:7","Warn: pipCommand not pinned by hash: Dockerfile:11","Warn: pipCommand not pinned by hash: Dockerfile:15","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2018-49 / GHSA-rprw-h62v-c2w7","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg","Warn: Project is vulnerable to: PYSEC-2015-17","Warn: Project is vulnerable to: PYSEC-2023-74"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:10:46.170Z","repository_id":43471449,"created_at":"2025-08-18T23:10:46.171Z","updated_at":"2025-08-18T23:10:46.171Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["licenses","python"],"created_at":"2025-11-15T03:00:27.336Z","updated_at":"2026-01-16T11:18:19.300Z","avatar_url":"https://github.com/ftpsolutions.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["Tools \u0026 libs"],"readme":"# Python third_party_license_file_generator\n\nThe Python third_party_license_file_generator is aimed at distilling down the appropriate license for one or many pip \"requirements\" files into a single file; it supports Python2.7 and Python3.\n\n## Thanks to everyone who has contributed over the years!\n\n- [marcoYxz](https://github.com/marcoYxz)\n- [fredvisser](https://github.com/fredvisser)\n- [Brian-Williams](https://github.com/Brian-Williams)\n- [andzn](https://github.com/andzn)\n- [dave-v](https://github.com/dave-v)\n- [j-b-d](https://github.com/j-b-d)\n- [malesh](https://github.com/malesh)\n- [lowaa](https://github.com/lowaa)\n\n## How do I install it?\n\n    $ pip install third-party-license-file-generator\n\n## How do I use it?\n\n    $ python -m third_party_license_file_generator -h\n\n## How does it work?\n\nWith no arguments (other than a pip \"requirements\" file and a Python executable path that has those requirements installed), the process is as follows:\n\n- walk the given Python executable's site-packages folder and build up package metadata (and license files, if present)\n- filter down by packages that are listed in the pip \"requirements\" file (and those packages dependencies, and their dependencies, and their dependencies... you get the gist)\n  - note: it follows \"-r some_file.txt\" references found in the pip \"requirements\" files\n- if a license name could not be secured for a package, try to gather that from the package's PyPI web page\n  - if a license name has still not been secured and the package lists a GitHub home page, try to find a license from there\n    - otherwise, assume the package to be commercially licensed (as it is legally understood that is the case)\n- if a license file could not be secured for a package and the package lists a GitHub home page, try to find a license from there\n  - otherwise, create a license (for the known license name) from a local collection of licenses (within the Python Third Party License Generator)\n- show a summary of packages against licenses to the user\n- build a THIRDPARTYLICENSES file in the current folder\n- give a return code of zero for success or non-zero for failures (e.g. GPL-licensed packages detected when specified to not permit GPL)\n\nIt's worth noting that information learned about packages is cached- so if you have to build one third party licenses file for a large project that has many components with many dependencies (but some overlap) then it's best to specify all those pip \"requirements\" files and Python executable paths in a single call to the Python third_party_license_file_generator as it will take less time overall.\n\nYou can specify a number of command line options (check syntax with -h) to do things like the following:\n\n- handle multiple pip \"requirements\" files\n- handle multiple Python executable paths\n- whether or not to permit GPL-licensed packages (default no)\n- specific GPL-licensed package exceptions (e.g. if a package lists exceptions to the GPL that may suit your needs but is still GPL-licensed)\n- whether or not to permit comercially-licensed packages (default no)\n- specific comercially-licensed package exceptions (e.g. if you have a license for a package or if you own a package)\n- a \"skip prefix\" (e.g. if you want to skip all packages starting with a certain string)\n- disable internet lookups (if you don't want to pull data from PyPI and GitHub)\n- disable skipping of not required packages (packages that are not requirements of other packages are skipped by default during license file generation)\n\n## Examples\n\nTwo different pip \"requirements\" files, two different Python paths (Virtualenvs) and a skip prefix:\n\n    python -m third_party_license_file_generator \\\n        -r requirements-py.txt \\\n        -p ~/.virtualenvs/backend_py/bin/python \\\n        -r requirements-pypy.txt \\\n        -p ~/.virtualenvs/backend_pypy/bin/python \\\n        -s ims-\n\nPlease note that pip \"requirements\" files and Python executable paths are paired together in the order they're specified.\n\nThree different pip \"requirements\" files, two different Python paths (need to repeat), a GPL exception and a custom output file:\n\n    python -m third_party_license_file_generator \\\n        -r requirements.txt \\\n        -p ~/.virtualenvs/api_pypy/bin/python \\\n        -r pypy_requirements.txt \\\n        -p ~/.virtualenvs/api_pypy/bin/python \\\n        -r cpython_requirements.txt \\\n        -p ~/.virtualenvs/api_py/bin/python \\\n        -x uWSGI \\\n        -o ThirdPartyLicenses.txt\n\nThree different pip \"requirements\" files, two different Python paths (need to repeat), a GPL exception, a custom output file and a license override file:\n\n    # contents of license_override_file.yml\n    uWSGI:\n        license_name: GPL-2.0 w/ linking exception\n        license_file: https://raw.githubusercontent.com/unbit/uwsgi/master/LICENSE\n\n    python -m third_party_license_file_generator \\\n        -r requirements.txt \\\n        -p ~/.virtualenvs/api_pypy/bin/python \\\n        -r pypy_requirements.txt \\\n        -p ~/.virtualenvs/api_pypy/bin/python \\\n        -r cpython_requirements.txt \\\n        -p ~/.virtualenvs/api_py/bin/python \\\n        -x uWSGI \\\n        -o ThirdPartyLicenses.txt \\\n        -l license_override_file.yml\n\nA pyproject.toml can also be supplied; only the licenses in the main dependencies section will be processed:\n\n    python -m third_party_license_file_generator \\\n        -r pyproject.toml \\\n        -p ~/.virtualenvs/backend_py/bin/python\n\nAn example of the structure of the generated third party license file is as follows:\n\n    Start of 'ThirdPartyLicenses.txt' generated by Python third_party_license_generator at 2018-04-19 12:36:58.627421\n\n    ----------------------------------------\n\n    Package: Django\n    License: BSD-3-clause\n    Requires: pytz\n    Author: Django Software Foundation \u003cfoundation@djangoproject.com\u003e\n    Home page: https://www.djangoproject.com/\n\n    (license content appears here in full)\n\n    ----------------------------------------\n\n    End of 'ThirdPartyLicenses.txt' generated by Python third_party_license_generator at 2018-04-19 12:36:58.627825\n\n## Packaging notes\n\n### Testing\n\nIf you're making any changes you can run the tests:\n\n```bash\n./test.sh\n```\n\n### Publishing\n\nNOTE: This probably only applies to folks that work at [FTP Solutions](https://github.com/ftpsolutions/) (maintainers of this package).\n\nThis will test a few Python versions, operating the tool against this repo's `requirements.txt`.\n\nWhen you're ready to push to PyPI, as long as you have a `~/.pypirc` and you have permissions to push to the repo:\n\n```bash\n./build-tag-and-push.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftpsolutions%2Fpython-third-party-license-file-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftpsolutions%2Fpython-third-party-license-file-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftpsolutions%2Fpython-third-party-license-file-generator/lists"}