betty.privatizer module¶
Provide an API to determine if information should be kept private.
- class betty.privatizer.Privatizer[source]¶
Bases:
objectPrivatize resources.
- Parameters:
lifetime_threshold (
int)localizer (
betty.locale.Localizer)
- __init__(lifetime_threshold: int, *, localizer: betty.locale.Localizer)[source]¶
- Parameters:
lifetime_threshold (
int)localizer (
betty.locale.Localizer)
- 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:
subject (
betty.model.ancestry.Person|betty.model.ancestry.Event|betty.locale.Date|None)generations_ago (
int)
- Return type:
- privatize(subject: betty.model.ancestry.HasPrivacy) None[source]¶
Privatize a resource.
- Parameters:
subject (
betty.model.ancestry.HasPrivacy)- Return type: