betty.license.licenses module

Provide betty.license.License plugins.

class betty.license.licenses.AllRightsReserved[source]

Bases: ShorthandPluginBase, License

A license that does not permit the public any rights.

property summary: Localizable

The license summary.

property text: Localizable

The full license text.

class betty.license.licenses.PublicDomain[source]

Bases: ShorthandPluginBase, License

A work is in the public domain <https://en.wikipedia.org/wiki/Public_domain>.

property summary: Localizable

The license summary.

property text: Localizable

The full license text.

class betty.license.licenses.SpdxLicenseRepository[source]

Bases: PluginRepository[License]

Provide licenses from the SPDX License List.

SPDX_VERSION = '3.25.0'
URL = 'https://github.com/spdx/license-list-data/archive/refs/tags/v3.25.0.tar.gz'
__init__(*, fetcher: Fetcher, localizer: Localizer, binary_file_cache: BinaryFileCache, process_pool: Executor, factory: Factory | None = None)[source]
async get(plugin_id: str) type[License][source]

Get a single plugin by its ID.

Raises:

PluginNotFound – if no plugin can be found for the given ID.

async license_id_to_spdx_license_id(license_id: str) str[source]

Get the SPDX license ID for the given Betty license plugin ID.

betty.license.licenses.spdx_license_id_to_license_id(spdx_license_id: str) str[source]

Get the Betty license plugin ID for the given SPDX license ID.