Skip to content

Licensing (MPL-2.0)

The open-source repositories in the entirius GitHub organisation are licensed under the Mozilla Public License 2.0, and Python source files say so in a header.

MPL instead of MIT or GPL:

  • file-level (weak) copyleft: changes to MPL files stay open, but they may be combined with closed code in a larger work;
  • lets open and closed code coexist legally: the platform under MPL, and next to it code that stays closed, such as the apps used in the service and client-specific work;
  • includes a patent grant; commercial use and resale are allowed.

Every open-source entirius repo has a LICENSE file in the root with the full MPL 2.0 text (source: https://www.mozilla.org/media/MPL/2.0/index.txt).

Every Python file starts with the MPL header as # comments:

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
  • After the shebang (if any), before the docstring.
  • Tests and migrations carry it too.
  • __init__.py is exempt: the hook skips it. A header there is allowed, not required.
  • The text lives once per repository, in .license-header.txt.

Frontend repositories carry no file headers. Their license is stated by the LICENSE file and the license field of package.json.

Python packages declare the license in pyproject.toml: license = "MPL-2.0" (SPDX, PEP 639).

  • Locally: the insert-license pre-commit hook adds the header to a .py file that lacks it. It is configured in the repository’s .pre-commit-config.yaml for .py files, __init__.py excluded.
  • In CI: the lint job runs the same hook over all files (pre-commit run insert-license --all-files), so a commit made with --no-verify still fails there.
  • A repository’s AGENTS.md names the license under its conventions (AGENTS.md Convention).

A repository under a different license says so in its own LICENSE and README.

AGENTS.md Convention: the instruction file every repository carries