betty.ancestry.event module - Betty documentation

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

# betty.ancestry.event module

Data types to describe events.

final class betty.ancestry.event.Event

  Bases: `ShorthandPluginBase`, `HasDate`, `HasFileReferences`, `HasCitations`, `HasNotes`, `HasDescription`, `HasPrivacy`, `HasLinks`, `UserFacingEntity`

  An event that took place.

  __init__(*, id: str | None = None, event_type: EventType | None = None, date: Datey | None = None, file_references: Iterable[FileReference] | ToManyResolver[FileReference] | None = None, citations: Iterable[Citation] | ToManyResolver[Citation] | None = None, notes: Iterable[Note] | ToManyResolver[Note] | None = None, privacy: Privacy | None = None, public: bool | None = None, private: bool | None = None, place: Place | None = None, description: ShorthandStaticTranslations | None = None, presences: Iterable[Presence] | ToManyResolver[Presence] | None = None)
  dated_linked_data_contexts() → tuple[str | None, str | None, str | None]

    Get the JSON-LD context term definition IRIs for the possible dates.

    Returns:

      A 3-tuple with the IRI for a single date, a start date, and an end date, respectively.

  async dump_linked_data(project: Project) → DumpMapping[Dump]

    Dump this instance to JSON-LD.

  property event_type: EventType

    The type of event.

  property label: Localizable

    The entity’s human-readable label.

  async classmethod linked_data_schema(project: Project) → JsonLdObject

    Define the JSON Schema for `betty.json.linked_data.LinkedDataDumpable.dump_linked_data()`.

  place

    The place the event happened.

  classmethod plugin_label_plural() → Localizable

    The human-readable entity type label, plural.

  presences

    A bidirectional *-to-many entity type association.