betty.model.ancestry 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.model.ancestry module

Provide Betty’s main data model.

class betty.model.ancestry.Ancestry

  Bases: `MultipleTypesEntityCollection`[`Entity`]

  An ancestry contains all the entities of a single family tree/genealogical data set.

  __init__()
  add_unchecked_graph(*entities: betty.model.Entity) → None

    Add entities to the ancestry but do not automatically add associates as well.

    It is the caller’s responsibility to ensure all associates are added to the ancestry. If this is done, calling this method is faster than the usual entity collection methods.

    Parameters:

      entities (`betty.model.Entity`)

    Return type:

      `None`

class betty.model.ancestry.AnonymousCitation

  Bases: `Citation`

  Parameters:

    - id (`str` | `None`)

    - facts (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.HasCitations`]])

    - source (`betty.model.ancestry.Source` | `None`)

    - location (`betty.locale.Str` | `None`)

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

    - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

  static __new__(*args, **kwargs)
  property location: Str

class betty.model.ancestry.AnonymousSource

  Bases: `Source`

  Parameters:

    - name (`str` | `None`)

    - id (`str` | `None`)

    - author (`str` | `None`)

    - publisher (`str` | `None`)

    - contained_by (`betty.model.ancestry.Source` | `None`)

    - contains (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Source`]])

    - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

    - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

  static __new__(*args, **kwargs)
  property name: str

class betty.model.ancestry.Attendee

  Bases: `PresenceRole`

  Someone attended the event (further details unknown).

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Beneficiary

  Bases: `PresenceRole`

  Someone was a benificiary in the event, such as a `betty.model.event_type.Will`.

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Celebrant

  Bases: `PresenceRole`

  Someone was the celebrant at the event.

  This includes but is not limited to:

  - civil servant

  - religious leader

  - civilian

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Citation

  Bases: `Dated`, `HasFiles`, `HasPrivacy`, `HasLinksEntity`, `UserFacingEntity`, `Entity`

  A citation (a reference to a source).

  Parameters:

    - id (`str` | `None`)

    - facts (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.HasCitations`]])

    - source (`betty.model.ancestry.Source` | `None`)

    - location (`betty.locale.Str` | `None`)

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

    - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

  __init__(*, id: str | None = None, facts: Iterable[betty.model.ancestry.HasCitations] | None = None, source: betty.model.ancestry.Source | None = None, location: betty.locale.Str | None = None, date: betty.locale.Date | betty.locale.DateRange | None = None, files: Iterable[betty.model.ancestry.File] | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None)
    Parameters:

      - id (`str` | `None`)

      - facts (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.HasCitations`]])

      - source (`betty.model.ancestry.Source` | `None`)

      - location (`betty.locale.Str` | `None`)

      - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

      - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property facts: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property source: AssociateT & Entity | None

    Get the associate from the given owner.

    Parameters:

      owner (OwnerT & Entity)

class betty.model.ancestry.Dated

  Bases: `LinkedDataDumpable`

  A resource with date information.

  Parameters:

    - args (`typing.Any`)

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

    - kwargs (`typing.Any`)

  __init__(*args: Any, date: betty.locale.Date | betty.locale.DateRange | None = None, **kwargs: Any)
    Parameters:

      - args (`typing.Any`)

      - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

      - kwargs (`typing.Any`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

class betty.model.ancestry.Described

  Bases: `LinkedDataDumpable`

  A resource with a description.

  Parameters:

    - args (`typing.Any`)

    - description (`str` | `None`)

    - kwargs (`typing.Any`)

  __init__(*args: Any, description: str | None = None, **kwargs: Any)
    Parameters:

      - args (`typing.Any`)

      - description (`str` | `None`)

      - kwargs (`typing.Any`)

  description: `str` | `None`

    The human-readable description.

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

class betty.model.ancestry.Enclosure

  Bases: `Dated`, `HasCitations`, `Entity`

  The enclosure of one place by another.

  Enclosures describe the outer (``enclosed_by`) and inner(``encloses`) places, and their relationship.

  Parameters:

    - encloses (`betty.model.ancestry.Place` | `None`)

    - enclosed_by (`betty.model.ancestry.Place` | `None`)

  __init__(encloses: betty.model.ancestry.Place | None = None, enclosed_by: betty.model.ancestry.Place | None = None)
    Parameters:

      - encloses (`betty.model.ancestry.Place` | `None`)

      - enclosed_by (`betty.model.ancestry.Place` | `None`)

  property enclosed_by: AssociateT & Entity | None

    The outer place.

    Parameters:

      owner (OwnerT & Entity)

  property encloses: AssociateT & Entity | None

    The inner place.

    Parameters:

      owner (OwnerT & Entity)

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

class betty.model.ancestry.Event

  Bases: `Dated`, `HasFiles`, `HasCitations`, `HasNotes`, `Described`, `HasPrivacy`, `HasLinksEntity`, `UserFacingEntity`, `Entity`

  An event that took place.

  Parameters:

    - id (`str` | `None`)

    - event_type (`type`[`betty.model.event_type.EventType`])

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

    - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

    - citations (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Citation`]])

    - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

    - place (`betty.model.ancestry.Place` | `None`)

    - description (`str` | `None`)

  __init__(*, id: str | None = None, event_type: type[betty.model.event_type.EventType] = <class 'betty.model.event_type.UnknownEventType'>, date: betty.locale.Date | betty.locale.DateRange | None = None, files: typing.Iterable[betty.model.ancestry.File] | None = None, citations: typing.Iterable[betty.model.ancestry.Citation] | None = None, notes: typing.Iterable[betty.model.ancestry.Note] | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None, place: betty.model.ancestry.Place | None = None, description: str | None = None)
    Parameters:

      - id (`str` | `None`)

      - event_type (`type`[`betty.model.event_type.EventType`])

      - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

      - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

      - citations (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Citation`]])

      - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

      - place (`betty.model.ancestry.Place` | `None`)

      - description (`str` | `None`)

  property associated_files: Iterable[File]

    All files directly or indirectly associated with this entity.

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property event_type: type[EventType]

    The type of event.

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property place: AssociateT & Entity | None

    The place the event happened.

    Parameters:

      owner (OwnerT & Entity)

  property presences: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

class betty.model.ancestry.File

  Bases: `Described`, `HasPrivacy`, `HasLinksEntity`, `HasMediaType`, `HasNotes`, `HasCitations`, `UserFacingEntity`, `Entity`

  A file on disk.

  This includes but is not limited to:

  - images

  - video

  - audio

  - PDF documents

  Parameters:

    - path (`pathlib._local.Path`)

    - id (`str` | `None`)

    - name (`str` | `None`)

    - media_type (`betty.media_type.MediaType` | `None`)

    - description (`str` | `None`)

    - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

    - citations (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Citation`]])

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

  __init__(path: pathlib._local.Path, *, id: str | None = None, name: str | None = None, media_type: betty.media_type.MediaType | None = None, description: str | None = None, notes: Iterable[betty.model.ancestry.Note] | None = None, citations: Iterable[betty.model.ancestry.Citation] | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None, links: collections.abc.MutableSequence[betty.model.ancestry.Link] | None = None)
    Parameters:

      - path (`pathlib._local.Path`)

      - id (`str` | `None`)

      - name (`str` | `None`)

      - media_type (`betty.media_type.MediaType` | `None`)

      - description (`str` | `None`)

      - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

      - citations (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Citation`]])

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

      - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property entities: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property name: str

    The file name.

  property path: Path

    The file’s path on disk.

class betty.model.ancestry.HasCitations

  Bases: `LinkedDataDumpable`

  An entity with citations that support it.

  Parameters:

    - self (HasCitations & Entity)

    - args (Any)

    - citations (Iterable[Citation] | None)

    - kwargs (Any)

  __init__(*args: Any, citations: Iterable[Citation] | None = None, **kwargs: Any)
    Parameters:

      - self (HasCitations & Entity)

      - args (Any)

      - citations (Iterable[Citation] | None)

      - kwargs (Any)

  property citations: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

class betty.model.ancestry.HasFiles

  Bases: `object`

  An entity that has associated `betty.model.ancestry.File` entities.

  Parameters:

    - self (HasFiles & Entity)

    - args (Any)

    - files (Iterable[File] | None)

    - kwargs (Any)

  __init__(*args: Any, files: Iterable[File] | None = None, **kwargs: Any)
    Parameters:

      - self (HasFiles & Entity)

      - args (Any)

      - files (Iterable[File] | None)

      - kwargs (Any)

  property associated_files: Iterable[File]

    All files directly or indirectly associated with this entity.

  property files: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

class betty.model.ancestry.HasLinks

  Bases: `LinkedDataDumpable`

  A resource that has external links.

  Parameters:

    - args (`typing.Any`)

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

    - kwargs (`typing.Any`)

  __init__(*args: Any, links: collections.abc.MutableSequence[betty.model.ancestry.Link] | None = None, **kwargs: Any)
    Parameters:

      - args (`typing.Any`)

      - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

      - kwargs (`typing.Any`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property links: MutableSequence[Link]

    The extenal links.

class betty.model.ancestry.HasLinksEntity

  Bases: `HasLinks`

  An entity that has external links.

  Parameters:

    - args (`typing.Any`)

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

    - kwargs (`typing.Any`)

  async dump_linked_data(app: App) → DictDump[Dump]

    Dump this instance to JSON-LD.

    Parameters:

      - self (HasLinksEntity & Entity)

      - app (App)

    Return type:

      DictDump[Dump]

class betty.model.ancestry.HasMediaType

  Bases: `LinkedDataDumpable`

  A resource with an IANA media type.

  Parameters:

    - args (`typing.Any`)

    - media_type (`betty.media_type.MediaType` | `None`)

    - kwargs (`typing.Any`)

  __init__(*args: Any, media_type: betty.media_type.MediaType | None = None, **kwargs: Any)
    Parameters:

      - args (`typing.Any`)

      - media_type (`betty.media_type.MediaType` | `None`)

      - kwargs (`typing.Any`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

class betty.model.ancestry.HasNotes

  Bases: `LinkedDataDumpable`

  An entity that has notes associated with it.

  Parameters:

    - self (HasNotes & Entity)

    - args (Any)

    - notes (Iterable[Note] | None)

    - kwargs (Any)

  __init__(*args: Any, notes: Iterable[Note] | None = None, **kwargs: Any)
    Parameters:

      - self (HasNotes & Entity)

      - args (Any)

      - notes (Iterable[Note] | None)

      - kwargs (Any)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property notes: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

class betty.model.ancestry.HasPrivacy

  Bases: `LinkedDataDumpable`

  A resource that has privacy.

  Parameters:

    - args (`typing.Any`)

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

    - kwargs (`typing.Any`)

  __init__(*args: Any, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None, **kwargs: Any)
    Parameters:

      - args (`typing.Any`)

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

      - kwargs (`typing.Any`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property own_privacy: Privacy

    The resource’s own privacy.

    This returns the value that was set for `betty.model.ancestry.HasPrivacy.privacy` and ignores computed privacies.

    For access control and permissions checking, use `betty.model.ancestry.HasPrivacy.privacy`.

  property privacy: Privacy

    The resource’s privacy.

  property private: bool

    Whether this resource is private.

  property public: bool

    Whether this resource is public.

class betty.model.ancestry.Link

  Bases: `HasMediaType`, `Localized`, `Described`, `LinkedDataDumpable`

  An external link.

  Parameters:

    - url (`str`)

    - relationship (`str` | `None`)

    - label (`str` | `None`)

    - description (`str` | `None`)

    - media_type (`betty.media_type.MediaType` | `None`)

    - locale (`str` | `None`)

  __init__(url: str, *, relationship: str | None = None, label: str | None = None, description: str | None = None, media_type: betty.media_type.MediaType | None = None, locale: str | None = None)
    Parameters:

      - url (`str`)

      - relationship (`str` | `None`)

      - label (`str` | `None`)

      - description (`str` | `None`)

      - media_type (`betty.media_type.MediaType` | `None`)

      - locale (`str` | `None`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  label: `str` | `None`

    The link’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  relationship: `str` | `None`

    The link’s IANA link relationship.

  url: `str`

    The link’s absolute URL

class betty.model.ancestry.Note

  Bases: `UserFacingEntity`, `HasPrivacy`, `HasLinksEntity`, `Entity`

  A note is a bit of textual information that can be associated with another entity.

  Parameters:

    - text (`str`)

    - id (`str` | `None`)

    - entity (`betty.model.ancestry.HasNotes` | `None`)

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

  __init__(text: str, *, id: str | None = None, entity: betty.model.ancestry.HasNotes | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None)
    Parameters:

      - text (`str`)

      - id (`str` | `None`)

      - entity (`betty.model.ancestry.HasNotes` | `None`)

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property entity: AssociateT & Entity | None

    The entity the note belongs to.

    Parameters:

      owner (OwnerT & Entity)

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property text: str

    The note’s human-readable text.

class betty.model.ancestry.Organizer

  Bases: `PresenceRole`

  Someone organized the event.

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Person

  Bases: `HasFiles`, `HasCitations`, `HasNotes`, `HasLinksEntity`, `HasPrivacy`, `UserFacingEntity`, `Entity`

  A person.

  Parameters:

    - id (`str` | `None`)

    - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

    - citations (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Citation`]])

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

    - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

    - parents (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Person`]])

    - children (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Person`]])

    - presences (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Presence`]])

    - names (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.PersonName`]])

  __init__(*, id: str | None = None, files: Iterable[betty.model.ancestry.File] | None = None, citations: Iterable[betty.model.ancestry.Citation] | None = None, links: collections.abc.MutableSequence[betty.model.ancestry.Link] | None = None, notes: Iterable[betty.model.ancestry.Note] | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None, parents: Iterable[betty.model.ancestry.Person] | None = None, children: Iterable[betty.model.ancestry.Person] | None = None, presences: Iterable[betty.model.ancestry.Presence] | None = None, names: Iterable[betty.model.ancestry.PersonName] | None = None)
    Parameters:

      - id (`str` | `None`)

      - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

      - citations (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Citation`]])

      - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

      - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

      - parents (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Person`]])

      - children (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Person`]])

      - presences (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Presence`]])

      - names (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.PersonName`]])

  property ancestors: Iterator[Person]

    All ancestors.

  property associated_files: Iterable[File]

    All files directly or indirectly associated with this entity.

  property children: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property descendants: Iterator[Person]

    All descendants.

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property names: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property parents: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property presences: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property siblings: list[Person]

    All siblings.

class betty.model.ancestry.PersonName

  Bases: `Localized`, `HasCitations`, `HasPrivacy`, `Entity`

  A name for a `betty.model.ancestry.Person`.

  Parameters:

    - id (`str` | `None`)

    - person (`betty.model.ancestry.Person` | `None`)

    - individual (`str` | `None`)

    - affiliation (`str` | `None`)

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

    - locale (`str` | `None`)

  __init__(*, id: str | None = None, person: betty.model.ancestry.Person | None = None, individual: str | None = None, affiliation: str | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None, locale: str | None = None)
    Parameters:

      - id (`str` | `None`)

      - person (`betty.model.ancestry.Person` | `None`)

      - individual (`str` | `None`)

      - affiliation (`str` | `None`)

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

      - locale (`str` | `None`)

  property affiliation: str | None

    The name’s affiliation, or family component.

    Also known as:

    - last name

    - surname

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property individual: str | None

    The name’s individual component.

    Also known as:

    - first name

    - given name

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property person: AssociateT & Entity | None

    The person whose name this is.

    Parameters:

      owner (OwnerT & Entity)

class betty.model.ancestry.Place

  Bases: `HasLinksEntity`, `HasFiles`, `HasNotes`, `HasPrivacy`, `UserFacingEntity`, `Entity`

  A place.

  A place is a physical location on earth. It may be identifiable by GPS coordinates only, or be a well-known city, with names in many languages, imagery, and its own Wikipedia page, or any type of place in between.

  Parameters:

    - id (`str` | `None`)

    - names (`list`[`betty.model.ancestry.PlaceName`] | `None`)

    - events (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Event`]])

    - enclosed_by (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Enclosure`]])

    - encloses (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Enclosure`]])

    - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

    - coordinates (`geopy.point.Point` | `None`)

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

  __init__(*, id: str | None = None, names: list[betty.model.ancestry.PlaceName] | None = None, events: Iterable[betty.model.ancestry.Event] | None = None, enclosed_by: Iterable[betty.model.ancestry.Enclosure] | None = None, encloses: Iterable[betty.model.ancestry.Enclosure] | None = None, notes: Iterable[betty.model.ancestry.Note] | None = None, coordinates: geopy.point.Point | None = None, links: collections.abc.MutableSequence[betty.model.ancestry.Link] | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None)
    Parameters:

      - id (`str` | `None`)

      - names (`list`[`betty.model.ancestry.PlaceName`] | `None`)

      - events (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Event`]])

      - enclosed_by (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Enclosure`]])

      - encloses (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Enclosure`]])

      - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

      - coordinates (`geopy.point.Point` | `None`)

      - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

  property associated_files: Iterable[File]

    All files directly or indirectly associated with this entity.

  property coordinates: Point | None

    The place’s coordinates.

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property enclosed_by: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property encloses: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property events: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property names: list[PlaceName]

    The place’s names.

  property walk_encloses: Iterator[Enclosure]

    All enclosed places.

class betty.model.ancestry.PlaceName

  Bases: `Localized`, `Dated`, `LinkedDataDumpable`

  A place name.

  A name has a locale and a date during which the name was in use.

  Parameters:

    - name (`str`)

    - locale (`str` | `None`)

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

  __init__(name: str, *, locale: str | None = None, date: betty.locale.Date | betty.locale.DateRange | None = None)
    Parameters:

      - name (`str`)

      - locale (`str` | `None`)

      - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property name: str

    The human-readable name.

class betty.model.ancestry.Presence

  Bases: `HasPrivacy`, `Entity`

  The presence of a `betty.model.ancestry.Person` at an `betty.model.ancestry.Event`.

  Parameters:

    - person (`betty.model.ancestry.Person` | `None`)

    - role (`betty.model.ancestry.PresenceRole`)

    - event (`betty.model.ancestry.Event` | `None`)

  __init__(person: betty.model.ancestry.Person | None, role: betty.model.ancestry.PresenceRole, event: betty.model.ancestry.Event | None)
    Parameters:

      - person (`betty.model.ancestry.Person` | `None`)

      - role (`betty.model.ancestry.PresenceRole`)

      - event (`betty.model.ancestry.Event` | `None`)

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property event: AssociateT & Entity | None

    The event the person was present at.

    Parameters:

      owner (OwnerT & Entity)

  property label: Str

    The entity’s human-readable label.

  property person: AssociateT & Entity | None

    The person whose presence is described.

    Parameters:

      owner (OwnerT & Entity)

  role: `betty.model.ancestry.PresenceRole`

    The role the person performed at the event.

class betty.model.ancestry.PresenceRole

  Bases: `object`

  A person’s role at an event.

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Privacy

  Bases: `Enum`

  The available privacy modes.

  PRIVATE = 2

    The resource is explicitly made private.

  PUBLIC = 1

    The resource is explicitly made public.

  UNDETERMINED = 3

    The resource has no explicit privacy. This means that:

    - it may be changed at will

    - when checking access, UNDETERMINED evaluates to PUBLIC.

class betty.model.ancestry.Source

  Bases: `Dated`, `HasFiles`, `HasNotes`, `HasLinksEntity`, `HasPrivacy`, `UserFacingEntity`, `Entity`

  A source of information.

  Parameters:

    - name (`str` | `None`)

    - id (`str` | `None`)

    - author (`str` | `None`)

    - publisher (`str` | `None`)

    - contained_by (`betty.model.ancestry.Source` | `None`)

    - contains (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Source`]])

    - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

    - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

    - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

    - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

    - privacy (`betty.model.ancestry.Privacy` | `None`)

    - public (`bool` | `None`)

    - private (`bool` | `None`)

  __init__(name: str | None = None, *, id: str | None = None, author: str | None = None, publisher: str | None = None, contained_by: betty.model.ancestry.Source | None = None, contains: Iterable[betty.model.ancestry.Source] | None = None, notes: Iterable[betty.model.ancestry.Note] | None = None, date: betty.locale.Date | betty.locale.DateRange | None = None, files: Iterable[betty.model.ancestry.File] | None = None, links: collections.abc.MutableSequence[betty.model.ancestry.Link] | None = None, privacy: betty.model.ancestry.Privacy | None = None, public: bool | None = None, private: bool | None = None)
    Parameters:

      - name (`str` | `None`)

      - id (`str` | `None`)

      - author (`str` | `None`)

      - publisher (`str` | `None`)

      - contained_by (`betty.model.ancestry.Source` | `None`)

      - contains (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Source`]])

      - notes (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.Note`]])

      - date (`betty.locale.Date` | `betty.locale.DateRange` | `None`)

      - files (`typing.Optional`[`typing.Iterable`[`betty.model.ancestry.File`]])

      - links (`collections.abc.MutableSequence`[`betty.model.ancestry.Link`] | `None`)

      - privacy (`betty.model.ancestry.Privacy` | `None`)

      - public (`bool` | `None`)

      - private (`bool` | `None`)

  property citations: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  property contained_by: AssociateT & Entity | None

    The source this one is directly contained by.

    Parameters:

      owner (OwnerT & Entity)

  property contains: EntityCollection[AssociateT & Entity]

    Get the associates from the given owner.

    Parameters:

      owner (OwnerT & Entity)

  async dump_linked_data(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

    Dump this instance to JSON-LD.

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  classmethod entity_type_label() → betty.locale.Str

    The human-readable entity type label, singular.

    Return type:

      `betty.locale.Str`

  classmethod entity_type_label_plural() → betty.locale.Str

    The human-readable entity type label, plural.

    Return type:

      `betty.locale.Str`

  property label: Str

    The entity’s human-readable label.

  async classmethod linked_data_schema(app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

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

    Parameters:

      app (`betty.app.App`)

    Return type:

      `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

  property walk_contains: Iterator[Source]

    All directly and indirectly contained sources.

class betty.model.ancestry.Speaker

  Bases: `PresenceRole`

  Someone performed public speaking at the event.

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Subject

  Bases: `PresenceRole`

  Someone was the subject of the event.

  The meaning of this role depends on the event type. For example, for `betty.model.event_type.Marriage`, the subjects are the people who got married. For `betty.model.event_type.Death` it is the person who died.

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

class betty.model.ancestry.Witness

  Bases: `PresenceRole`

  Someone witnessed the event.

  property label: Str

    The human-readable label.

  classmethod name() → str

    The machine name.

    Return type:

      `str`

betty.model.ancestry.is_private(target: Any) → bool

  Check if the given target is private.

  Parameters:

    target (`typing.Any`)

  Return type:

    `bool`

betty.model.ancestry.is_public(target: Any) → bool

  Check if the given target is public.

  Parameters:

    target (`typing.Any`)

  Return type:

    `bool`

betty.model.ancestry.merge_privacies(*privacies: betty.model.ancestry.Privacy | betty.model.ancestry.HasPrivacy | None) → betty.model.ancestry.Privacy

  Merge multiple privacies into one.

  Parameters:

    privacies (`betty.model.ancestry.Privacy` | `betty.model.ancestry.HasPrivacy` | `None`)

  Return type:

    `betty.model.ancestry.Privacy`

async betty.model.ancestry.ref_link(root_schema: dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]], app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

  Reference the Link schema.

  Parameters:

    - root_schema (`dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]])

    - app (`betty.app.App`)

  Return type:

    `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

async betty.model.ancestry.ref_link_collection(root_schema: dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]], app: betty.app.App) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

  Reference the schema for a collection of Link instances.

  Parameters:

    - root_schema (`dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]])

    - app (`betty.app.App`)

  Return type:

    `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

betty.model.ancestry.ref_media_type(root_schema: dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

  Reference the MediaType schema.

  Parameters:

    root_schema (`dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]])

  Return type:

    `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

betty.model.ancestry.ref_role(root_schema: dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]) → dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]]

  Reference the PresenceRole schema.

  Parameters:

    root_schema (`dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]])

  Return type:

    `dict`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[`typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]], `typing.Mapping`[`str`, `typing.Union`[`bool`, `int`, `float`, `str`, `None`, `typing.Sequence`[Dump], `typing.Mapping`[`str`, Dump]]]]]

betty.model.ancestry.resolve_privacy(privacy: betty.model.ancestry.Privacy | betty.model.ancestry.HasPrivacy | None) → betty.model.ancestry.Privacy

  Resolve the privacy of a value.

  Parameters:

    privacy (`betty.model.ancestry.Privacy` | `betty.model.ancestry.HasPrivacy` | `None`)

  Return type:

    `betty.model.ancestry.Privacy`