infer-license

A script to guess licenses based on text

MIT 9 个版本 Python >=3.10
Tim Hatch <tim@timhatch.com>
安装
pip install infer-license
poetry add infer-license
pipenv install infer-license
conda install infer-license
描述

infer-license

Heavily inspired by https://github.com/sol/infer-license/ this will provide an API to guess what license a given file represents.

>>> from infer_license import guess_file
>>> print(guess_file("LICENSE"))
License(name='MIT License', shortname='MIT', trove_classifier='License :: OSI Approved :: MIT License')
>>> guess_file("setup.py")
None

There's also a handy infer_license script that takes a filename.

$ infer_license LICENSE
LICENSE: MIT

License

infer-license is copyright Tim Hatch, and licensed under the MIT license. I am providing code in this repository to you under an open source license. This is my personal repository; the license you receive to my code is from me and not from my employer. See the LICENSE file for details.

版本列表
0.2.0 2024-01-22
0.1.0 2023-12-16
0.0.7 2020-03-22
0.0.6 2019-11-29
0.0.5 2019-11-29
0.0.4 2019-11-23
0.0.3 2019-11-23
0.0.2 2019-11-21
0.0.1 2019-11-20