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.7.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

infer_license-0.0.7-py3-none-any.whl (79.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for infer-license-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1d71545a8a0c68897e9663034430753061d7584bde9bd557439de5568d017955
MD5 6cbb5d2a1256d342fdb809ba6a4c9d98
BLAKE2b-256 afab088cc447b6b18574f4da2b472291857a0f277b9a80f2957a5391a07a9536

See more details on using hashes here.

Provenance

File details

Details for the file infer_license-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: infer_license-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 79.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for infer_license-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 648d90ee9f6a36cc75ec29ce334ae9255345263a880cd97885632de9adee60f3
MD5 ad188c20d4c977425ae39a3c401886af
BLAKE2b-256 6482f2b5332750844d555bde32f776d01f0d27f9def4bb1ba18f882c631e19ed

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