pychoosealicense.rules

Models conditions, permissions and limitations attached to licenses.

Classes:

Rule(tag, label, description)

Represents a permission, condition or limitation attached to a license.

RuleMap

Represents a mapping of rule types to mappings of rule tags to individual rules.

Data:

rules

The currently supported rules, grouped by type.

namedtuple Rule(tag, label, description)[source]

Bases: NamedTuple

Represents a permission, condition or limitation attached to a license.

Fields
  1.  tag (str) – An identifier for the rule, e.g. 'commercial-use'.

  2.  label (str) – A short label, e.g. 'Commercial use'.

  3.  description (str) – A short description of the rule.

__repr__()

Return a nicely formatted representation string

typeddict RuleMap[source]

Bases: TypedDict

Represents a mapping of rule types to mappings of rule tags to individual rules.

Required Keys
rules

Type:    RuleMap

The currently supported rules, grouped by type.