Skip to content

Rights, reports and Support tools

Accessed via client.rights and client.admin.

client.rights.set(asset_id, "licensed", licence="CC BY 4.0")   # needed before making an asset public
info = client.rights.moderation(asset_id)                       # active / disabled, with reasons
if info.status == "disabled":
    client.rights.appeal(asset_id, "I created this photo.")

# Anyone, no login:
ComadClient("https://dam.example.com").rights.report(
    "https://dam.example.com/assets/…", "My photograph", "A. Reporter", "a@example.com", "A. Reporter",
    good_faith=True, accuracy_statement=True)

The admin methods are for the Support team and administrators only.

pycomad.client.RightsClient

RightsClient(http: _HttpSession)

Rights declarations, moderation status, appeals and public reports.

get

get(asset_id: Union[UUID, str]) -> AssetRights

Return the owner's rights declaration for an asset.

Raises:

Type Description
ComadNotFoundError

If the asset has no declaration yet.

set

set(asset_id: Union[UUID, str], status: str, *, licence: Optional[str] = None, source: Optional[str] = None, notes: Optional[str] = None) -> AssetRights

Declare the right to hold and share an asset (required before it can be made public).

Parameters:

Name Type Description Default
asset_id Union[UUID, str]

The asset.

required
status str

own_work, licensed, permission, public_domain or other.

required
licence Optional[str]

Licence name or terms when licensed, e.g. "CC BY 4.0".

None
source Optional[str]

Where the material came from or who granted permission.

None
notes Optional[str]

Free text.

None

moderation

moderation(asset_id: Union[UUID, str]) -> ModerationInfo

Return whether an asset is active or disabled, with the reasons and appeal state.

appeal

appeal(asset_id: Union[UUID, str], text: str) -> None

Appeal the disabling of an asset you own (sends your counter-notice).

Raises:

Type Description
ComadValidationError

If the asset is not disabled or has already been appealed.

report

report(asset_ref: str, work_description: str, reporter_name: str, reporter_email: str, signature: str, *, kind: str = 'copyright', good_faith: bool, accuracy_statement: bool, reporter_org: Optional[str] = None, reporter_address: Optional[str] = None) -> NoticeReceipt

Report an asset as infringing or illegal. Public: needs no login.

Parameters:

Name Type Description Default
asset_ref str

The asset's address (URL) or id.

required
work_description str

The infringed work, or why the content is illegal.

required
reporter_name str

Your name.

required
reporter_email str

Where decisions are sent.

required
signature str

Typed full name as an electronic signature.

required
kind str

"copyright" or "other_illegal".

'copyright'
good_faith bool

Statement of good-faith belief that the use is not authorised / illegal.

required
accuracy_statement bool

Statement that the information is accurate.

required

pycomad.client.AdminClient

AdminClient(http: _HttpSession)

Support-team tools: review reports, the notification outbox, repeat infringers.

The server allows these only to the organisation's Support team (and administrators).

is_reviewer

is_reviewer() -> bool

True when the caller may use the review tools (show the Reports page).

list_notices

list_notices(status: Optional[str] = None) -> List[RightsNotice]

List reports, optionally by status (new, under_review, actioned, rejected, restored).

get_notice

get_notice(notice_id: Union[UUID, str]) -> RightsNotice

Fetch one report.

decide_notice

decide_notice(notice_id: Union[UUID, str], action: str, reason: Optional[str] = None) -> RightsNotice

Decide on a report.

Parameters:

Name Type Description Default
notice_id Union[UUID, str]

The report.

required
action str

review (mark under review), disable (withhold the asset), reject (no action) or restore (bring a disabled asset back).

required
reason Optional[str]

Required for disable, reject and restore; for disable it is sent to the owner as the statement of reasons.

None

repeat_infringers

repeat_infringers() -> List[OwnerStrikes]

List owners with actioned reports and whether they are over the policy threshold.

list_notifications

list_notifications(status: Optional[str] = None) -> List[Notification]

List outbox emails, optionally by status (queued, sent, failed, unconfirmed).

retry_notification

retry_notification(notification_id: Union[UUID, str]) -> None

Queue a failed or unconfirmed email again.

Raises:

Type Description
ComadValidationError

If the email is not failed or unconfirmed.