Skip to main content

FOSS Licenses

FOSS Licenses consists of:

  • license meta data for FOSS licenses adding useful information to existing licenses aiming at simplifying compliance work.

  • flame - command line program

  • Python API

License meta data

The meta data can be found in the var directory. Each license has a JSON file with meta information and a LICENSE file with the license text. The meta data consists of:

  • other names or aliases for licenses (e.g. "GNU GPL v. 2" is replaced by "GPL-2.0-only")

  • fixes for compound license written as one single license or using faulty syntax (e.g. "GPL-2.0-with-classpath-exception" -> "GPL-2.0-only WITH Classpath-exception-2.0")

  • other names for operators (e.g. "||" is replaced by "OR")

  • translation of license with dual license features to a compound license expression (e.g. "GPL-2.0-or-later" -> "GPL-2.0-only OR GPL-3.0-only")

  • compatibility as another license (e.g. "X11-Style (Keith Packard)" is compatibility wise the same as "HPND")

  • ambiguous license name (e.g. "GNU General Public License", which misses the version number)

  • license text

Background

There are lots of software licenses out there (e.g. see ScanCode LicenseDB), some of them are FOSS and some not. In this project we primarily focus on FOSS licenses.

License name proliferation

When you're working with compliance you are used to licenses called differently in source code or by tools (e.g. GPLv2, GPL (v2) and GNU General Public License Version 2) when all you really want too see is the SPDX identifier GPL-2.0-only. A seasoned compliance engineer or lawyer knows this already, but we need this information to be machine readable.

License proliferation

Another problem you face when working with compliance is the need to check whether the licenses in a combined work are compatible. One example is the X11-Style (Keith Packard) license, which really is the same license as the Historical Permission Notice and Disclaimer - sell variant. X11-Style (Keith Packard) is not supported in typical compliance tools, but HPND-sell-variant is. Again, a seasoned license engineer or lawyer knows which licenses are compatible and which are not, but we need to make it possible for a machine to assist us.

Status

Current support:

Type Number
Licenses 310
Aliases 3992
Compatibilities 22
Operators 14
Ambiguities 192
Compounds 112
No versions 39

About

This project aims at providing a database with:

  • "all" different names for a license in a database

  • mappings from one license to another license which is supported by typical compliance tools

and, to make the database easier to use:

  • a Python API

  • command line tool

Contributions

You are more than welcome to contribute.

License reviews

It would be great if you could check the licenses and feedback us (see HOW below).

Hacking

If you find a bug and have a fix or have written a new feature you want addded. Create a PR and we'll have a look..

Suggest new features and report bugs

We need input from you on how you use or would like to use foss-licenses.

Suggest new license to support

Do you miss a license that you want support for. Create an issue with the following information:

  • SPDX identifier (if any)

  • Scancode identifier (if any)

  • License text (or a URL)

  • Aliases you would like to add (if any)

  • Same compatibility as another license (if any)

How

  • create an issue

  • create PR for code or license contributions

CLA?

We do not have a CLA or similar, but we assume your contributions are made under our license (for the code and data).

Related tools and projects

Acknowledgements

Technical notes

Normalizing license expressions

We fix your license expressions with the following methods (listed in order)

Normalize aliases

With our database we can replace a license like "GPLv2+" to the SPDX identifier "GPL-2.0-or-later". We do this by searching for needles and replace them. To search for needles, in our case license expressions, (e.g. "BSD 0-Clause") to replace (with e.g. "0BSD") we use the following strategy:

  • list all needles in order of length, longest first

  • for each needle find and replace

This is a naive approach but given the limited data at hand it should work.

Normalize compound license expressions

Some compound licenses (e.g. "GPL-2.0-only WITH Classpath-exception-2.0") are stated incorrectly (e.g. "GPL-2.0-only AND Classpath-exception-2.0") or as a singe license (""GPL-2.0-with-classpath-exception). The license expression is scanned for licenses as listed in var/compounds.json and replaced accordingly.

Normalize operators

The license expression is scanned for operators as listed in var/operators.json and replaced accordingly (e.g. "||" is replaced by "OR").

Normalize dual licenses

Some licenses have a built in dual license feature (e.g. "GPL-2.0-or-later"). We replace such licenses with the corresponding dual licenses.

As an example: "GPL-2.0-or-later" is replacde by "(GPL-2.0-only OR GPL-3.0-only")

Insert same compatibility as another license

Some licenses are not supported by typical compliance tools (e.g. "X11-Style (Keith Packard)") but the license is very similar and has the same compatibility towards other licenses as another license (e.g. "HPND").

To allow for tools (e.g. flict) to check compatibility of an inbound license expression against an outbound license expression we replace the unknown license with the known and with same compatibility.

Extending flame

Python API

See Python API

Command line program

You can extend flame, the command line program, in two different ways:

  • using the option additional-license-dir

  • using the environment variable FLAME_USER_CONFIG

Using the option additional-license-dir

Assuming you want to extend flame with the licenses located in the directory more-licenses and then list the licenses (using the command licenses):

flame --additional-license-dir more-licenses licenses

Using the environment variable FLAME_USER_CONFIG

You have a config file, called flame-config.json, with the variable additional-license-dirset to more-licenses, like this:

{
    "additional-license-dir": "./more-licenses/"
}

then you can start flame to read the config file like this:

FLAME_USER_CONFIG=flame-config.json flame licenses

Metadata

Release files for foss-flame 0.21.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foss-flame 0.21.14
File Size Uploaded Provenance Actions
foss_flame-0.21.14.tar.gz 612.9 kB Without provenance Details for foss_flame-0.21.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for foss-flame 0.21.14
File Interpreter ABI Platform Actions
foss_flame-0.21.14-py2.py3-none-any.whl Python 3, Python 2 none any Details for foss_flame-0.21.14-py2.py3-none-any.whl

Total release size: 1.6 MB

Release files / foss_flame-0.21.14.tar.gz

Download URL foss_flame-0.21.14.tar.gz
Size 612.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7ec6f55d0ff0801739d12b358129c53034ac5034f2164ea61873d32845e97a24
BLAKE2b-256 checksum
How to use checksums
243df44a511fe7dc0a74492d3127624448bbadc56f695ee237aa44c65b6e22ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / foss_flame-0.21.14-py2.py3-none-any.whl

Download URL foss_flame-0.21.14-py2.py3-none-any.whl
Size 1.0 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
deaf549bee957a0923be0faea22b61816bf0618d0e922a7fce0a2e72238c88b4
BLAKE2b-256 checksum
How to use checksums
8c8f79577946124bab1b1c1029542515a091ca0013e3f016114a91f2d7653d3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for foss-flame 0.21.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.21.14 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page