betty.deriver module - Betty 0.4.0a3 documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.deriver module

Provide an API to derive information from ancestries, and create new entities or update existing ones.

class betty.deriver.Derivation

  Bases: `Enum`

  Derivation types.

  CREATE = 2

    The derivation created new data.

  NONE = 1

    No derivation took place.

  UPDATE = 3

    The derivation updated existing data.

final class betty.deriver.Deriver

  Bases: `object`

  Derive information from ancestries, and create new entities or update existing ones.

  Parameters:

    - ancestry (`betty.model.ancestry.Ancestry`)

    - lifetime_threshold (`int`)

    - derivable_event_types (`set`[`type`[`betty.model.event_type.DerivableEventType`]])

    - localizer (`betty.locale.Localizer`)

  __init__(ancestry: betty.model.ancestry.Ancestry, lifetime_threshold: int, derivable_event_types: set[type[betty.model.event_type.DerivableEventType]], *, localizer: betty.locale.Localizer)
    Parameters:

      - ancestry (`betty.model.ancestry.Ancestry`)

      - lifetime_threshold (`int`)

      - derivable_event_types (`set`[`type`[`betty.model.event_type.DerivableEventType`]])

      - localizer (`betty.locale.Localizer`)

  async derive() → None

    Derive additional data.

    Return type:

      `None`