# 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](http://timhatch.com/), 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/python-packaging/infer-license/",
"name": "infer-license",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "",
"author": "Tim Hatch",
"author_email": "tim@timhatch.com",
"download_url": "https://files.pythonhosted.org/packages/91/9f/ac2f3a7accfc5335c3c7e5d30b2a233d5c7ac5560c5d0dc18f3a83feb628/infer-license-0.2.0.tar.gz",
"platform": null,
"description": "# infer-license\n\nHeavily inspired by https://github.com/sol/infer-license/ this will provide an\nAPI to guess what license a given file represents.\n\n```\n>>> from infer_license import guess_file\n>>> print(guess_file(\"LICENSE\"))\nLicense(name='MIT License', shortname='MIT', trove_classifier='License :: OSI Approved :: MIT License')\n>>> guess_file(\"setup.py\")\nNone\n```\n\nThere's also a handy `infer_license` script that takes a filename.\n\n```\n$ infer_license LICENSE\nLICENSE: MIT\n```\n\n\n# License\n\ninfer-license is copyright [Tim Hatch](http://timhatch.com/), and licensed under\nthe MIT license. I am providing code in this repository to you under an open\nsource license. This is my personal repository; the license you receive to\nmy code is from me and not from my employer. See the `LICENSE` file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A script to guess licenses based on text",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/python-packaging/infer-license/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e56b3f77cdf36c815cd2297a45ad0e0c5c7a6a6fa95e83061ac8d886454f0377",
"md5": "cf1f7d48ca08dfb642ad1892f659272f",
"sha256": "23de3988a35513e8cea925ff500e70e1f7df52ad25dc8ca80c0d4609632c4f93"
},
"downloads": -1,
"filename": "infer_license-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf1f7d48ca08dfb642ad1892f659272f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 80138,
"upload_time": "2024-01-22T17:53:44",
"upload_time_iso_8601": "2024-01-22T17:53:44.308960Z",
"url": "https://files.pythonhosted.org/packages/e5/6b/3f77cdf36c815cd2297a45ad0e0c5c7a6a6fa95e83061ac8d886454f0377/infer_license-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "919fac2f3a7accfc5335c3c7e5d30b2a233d5c7ac5560c5d0dc18f3a83feb628",
"md5": "ceb36d362a5cc4121075773a8392dd07",
"sha256": "05aa3f5b64053d2defba2ecf9f495615b03f0ec0a3a7b165eeee83565070b896"
},
"downloads": -1,
"filename": "infer-license-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "ceb36d362a5cc4121075773a8392dd07",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 61509,
"upload_time": "2024-01-22T17:53:46",
"upload_time_iso_8601": "2024-01-22T17:53:46.292283Z",
"url": "https://files.pythonhosted.org/packages/91/9f/ac2f3a7accfc5335c3c7e5d30b2a233d5c7ac5560c5d0dc18f3a83feb628/infer-license-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-22 17:53:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "python-packaging",
"github_project": "infer-license",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "infer-license"
}