Skip to main content

A script to guess licenses based on text

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infer-license-0.0.4.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

infer_license-0.0.4-py2.py3-none-any.whl (79.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file infer-license-0.0.4.tar.gz.

File metadata

  • Download URL: infer-license-0.0.4.tar.gz
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for infer-license-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1fe4f5058f313853acec01137d44fb954b552da70eeda7bae17c471d3df87f77
MD5 04b187682b5919e4af1992e8ef88d93e
BLAKE2b-256 aff9dc24bd3eba81d029499172837aeff1ce0cddbc3f68438c59a2126326d929

See more details on using hashes here.

Provenance

File details

Details for the file infer_license-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: infer_license-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 79.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.8.0

File hashes

Hashes for infer_license-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec1c324c74fc52e9e3b7abaafd78a90ced0976ed4d4a3dd2e1332e17eb8a20c0
MD5 7478756c95aa9b6f6bcc8f6a2ddc5f52
BLAKE2b-256 534f32e6350a7121604800d817a289f6ab78d300297f091cbc4f5ec38230e531

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page