betty.privatizer module

Provide an API to determine if information should be kept private.

class betty.privatizer.Privatizer[source]

Bases: object

Privatize resources.

Parameters:
__init__(lifetime_threshold: int, *, localizer: betty.locale.Localizer)[source]
Parameters:
has_expired(subject: betty.model.ancestry.Person | betty.model.ancestry.Event | betty.locale.Date | None, generations_ago: int = 0) bool[source]

Check if a subject of the given generation has expired.

Parameters:
Return type:

bool

privatize(subject: betty.model.ancestry.HasPrivacy) None[source]

Privatize a resource.

Parameters:

subject (betty.model.ancestry.HasPrivacy)

Return type:

None