src/pqc_content_provenance/assertions/usage.py
| 1 | """Assertion: permitted usage of this content (c2pa.usage).""" |
| 2 | |
| 3 | from __future__ import annotations |
| 4 | |
| 5 | from dataclasses import dataclass, field |
| 6 | from typing import ClassVar |
| 7 | |
| 8 | from pqc_content_provenance.assertions.base import Assertion |
| 9 | |
| 10 | |
| 11 | @dataclass |
| 12 | class UsageAssertion(Assertion): |
| 13 | """How this generated content may be used.""" |
| 14 | |
| 15 | label: ClassVar[str] = "c2pa.usage" |
| 16 | |
| 17 | license: str = "all-rights-reserved" # spdx identifier or custom string |
| 18 | commercial_use: bool = False |
| 19 | attribution_required: bool = True |
| 20 | attribution_text: str = "" # what credit must say |
| 21 | jurisdictions: list[str] = field(default_factory=list) # countries where valid |
| 22 | expiry: str = "" # ISO-8601 or empty |
| 23 | |