Free, open-source tool

Dataset licence checker for Python, the command line and CI

Check whether dataset sources can be merged, trained on or redistributed, from Python, the command line or a GitHub workflow, with the licence clause behind each step.

By Bayanat Labs· Updated · اقرأ بالعربية

The dataset licence checker is the rules engine behind the Dataset Licence Compatibility Checker by Bayanat Labs. Give it your sources, each with its licence or terms, and an intended use, and it returns a verdict for each source and for the mix, the obligations that follow, the licences a release can use, a split plan when sources conflict and attribution lines, each step with the clause it rests on. The rules are versioned YAML: 33 licences and terms in rules version 2026.10.19. Information, not legal advice.

Open the web app · Code on GitHub · Release record

Install and run

pip install "git+https://github.com/Bayanat-Labs/license-check@v0.1.0"

bl-license check --source "Encyclopedia=CC-BY-SA-4.0" --source "Map=ODbL-1.0" \
  --use redistribute-annotations --mode merged --format markdown
bl-license check sources.json --out result.json --markdown report.md --fail-on not_allowed,unknown
bl-license list              # licences and terms
bl-license show ODbL-1.0     # one entry with its citations

Python 3.10 or later, no runtime dependencies. The PyPI package has not been released yet; pip install bayanatlabs-license-check will work once it is published. Exit codes: 0 done, 1 the combined verdict is in --fail-on, 2 bad input.

from bayanatlabs_license_check import check

result = check({
    "sources": [
        {"name": "Encyclopedia", "licence": "CC-BY-SA-4.0"},
        {"name": "Government data", "licence": "CC-BY-4.0"},
    ],
    "use": "redistribute-annotations",
    "mode": "merged",
})
result["combined"]["verdict"]              # "allowed_with_obligations"
result["combined"]["release"]["options"]   # ["CC-BY-SA-4.0", "GPL-3.0-only"]

In a GitHub workflow

- uses: Bayanat-Labs/license-check@v0.1.0
  with:
    input: release/sources.json
    fail-on: not_allowed,unknown

The job fails when the combined verdict is one of the listed verdicts, and the Markdown report goes to the job summary.

Examples

  • Merging CC BY-SA 4.0 text with an ODbL database is not allowed: no licence satisfies both share-alike conditions, so the split plan keeps them in separate parts.
  • Merging CC BY-SA 4.0 text with CC BY 4.0 data is allowed with obligations, and the release can carry CC BY-SA 4.0.
  • Training a commercial model on CC BY-NC 4.0 data is not allowed; internal training on it by a company is unknown, because non-commercial terms turn on the purpose of the use.

What it checks

  • Uses: internal training, commercial model training, verbatim redistribution and derived annotations, with a choice between separate parts and one merged dataset.
  • Context: a commercial purpose, use by a company, personal data in the data.
  • Licences and terms: Creative Commons licences and CC0, Open Data Commons and CDLA licences, government open data terms, research-only and LDC-style agreements, website terms limited to personal use, all rights reserved, no licence, public domain, and model-output terms added to a source (OpenAI, the Gemini API, Gemma and Llama).
  • Output: input and output follow published JSON Schemas; each result carries the rules version and the SHA-256 of the compiled rules.
  • Tests: verdict test cases, each citing the clause that decides it; the web app's JavaScript engine gives the same result as the Python engine on each case.

Cite as

Bayanat Labs (2026). Dataset Licence Compatibility Checker (license-check), version 0.1.0, rules version 2026.10.19. https://github.com/Bayanat-Labs/license-check. Apache-2.0 (code), CC BY 4.0 (rules and test cases).

The release record, with licences and changelog, is the Dataset Licence Compatibility Checker on Bayanat Labs Open.

Licence and contact

Code: Apache-2.0. Rules, test cases, schemas and documentation: CC BY 4.0. Quotations from licences and terms remain under their owners' terms. Corrections and requests for new licences or terms: hello@bayanatlabs.com.

Need Arabic training data with clear licensing?

The checker is free. For licensed Arabic text collections with their own counts and licensing details, see Bayanat Knowledge.