Two licences, one repository
Apache-2.0 for the engine, CC BY 4.0 for the corpus — why the split is drawn there, and why it is machine-readable in three places.
The OpenRegs team
Code and corpus live in the same repository and are licensed apart, because they are different kinds of thing and a consumer usually wants one of them.
| what | licence |
|---|---|
code — the tooling, and everything outside regimes/ | Apache-2.0 |
corpus data — every regime's canon/, atoms/, graph/, releases/ | CC-BY-4.0 |
Why CC BY 4.0 and not ODbL
A corpus of law is a database, and in some jurisdictions a database attracts a sui generis right on top of copyright. CC BY 4.0 covers both in one instrument and asks only for attribution.
The Open Database License would have asked for more: share-alike on derived databases. That single clause would stop a bank embedding the corpus in a proprietary compliance system — which is precisely the use we are building for. Public-law data that cannot be used inside the systems that have to comply with it is not open in any sense that matters.
The split is machine-readable in three places
A licence stated only in prose gets guessed at by the next packager down the line. This one is stated where machines read:
- Every source file in the tooling carries
SPDX-License-Identifier: Apache-2.0on its first line, and a check gates it. - Every built release names both identifiers in its
release-meta.yaml—code: Apache-2.0,data: CC-BY-4.0. - The PyPI wheel's
License:field, the npmpackage.json, and both packages'manifest.jsonare rendered from that block, so a downstream packager reads the split instead of inferring it.
Neither licence relicenses the law
This is the part that is easy to get wrong. OpenRegs does not own the
legislation it mirrors, and no grant it makes can enlarge what a regulator's
publication service granted. The project's NOTICE states the terms each
service publishes under — EUR-Lex, legislation.gov.uk, the eCFR and the Federal
Register — and a regime's SOURCES.lock names the exact document, digest and
retrieval instant behind every canonical text. What is licensed here is the
project's own contribution: the normalisation, the consolidation, the atoms and
the graph.
What that means for the commercial line
Two commitments follow from the split, and they are the reason it is written down this way rather than left to good intentions:
- Public-law corpus data is always open.
- Anything required to self-host stays open source.
The commercial line is drawn at operations — hosting, freshness, private regimes, attestation — not at the data and not at the engine. A licence you can verify is worth more than a promise you cannot.
Release announcements and posts syndicate over RSS.