项目作者: dephell

项目描述 :
Get info about OSS licenses
高级语言: Python
项目地址: git://github.com/dephell/dephell_licenses.git
创建时间: 2019-03-25T18:13:21Z
项目社区:https://github.com/dephell/dephell_licenses

开源协议:MIT License

下载


DepHell Licenses

travis
appveyor
MIT License

Manage OSS licenses: retrieve information, generate.

Installation

Install from PyPI:

  1. python3 -m pip install --user dephell_licenses

Usage

  1. from dephell_licenses import licenses
  2. # ways to get a license:
  3. license = licenses.get_by_id('MIT')
  4. license = licenses.get_by_name('MIT License')
  5. license = licenses.get_by_classifier('License :: OSI Approved :: MIT License')
  6. # license object
  7. license
  8. # License(id='MIT', classifier='License :: OSI Approved :: MIT License', name='MIT License', approved=True, deprecated=False, links=['https://opensource.org/licenses/MIT'], url='http://spdx.org/licenses/MIT.json')
  9. # generate license
  10. license.make_text(copyright='2019 Gram')
  11. # 'MIT License\n\nCopyright (c) 2019 Gram\n\nPermission is hereby granted ...'
  1. go run stat.go | grep "License :: " | perl -F"\|" -lane 'print $F[0] if $F[1]>100' | sort

There is the full list of the license classifiers with more than 100 projects that uses it:

  1. License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
  2. License :: DFSG approved
  3. License :: Free for non-commercial use
  4. License :: Freely Distributable
  5. License :: Freeware
  6. License :: OSI Approved
  7. License :: OSI Approved :: Apache Software License
  8. License :: OSI Approved :: BSD License
  9. License :: OSI Approved :: GNU Affero General Public License v3
  10. License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
  11. License :: OSI Approved :: GNU General Public License (GPL)
  12. License :: OSI Approved :: GNU General Public License v2 (GPLv2)
  13. License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
  14. License :: OSI Approved :: GNU General Public License v3 (GPLv3)
  15. License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
  16. License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
  17. License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
  18. License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
  19. License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
  20. License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
  21. License :: OSI Approved :: ISC License (ISCL)
  22. License :: OSI Approved :: MIT License
  23. License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
  24. License :: OSI Approved :: Python Software Foundation License
  25. License :: OSI Approved :: Zope Public License
  26. License :: Other/Proprietary License
  27. License :: Public Domain
  28. License :: Repoze Public License