betty.ancestry.file module

Data types representing files on disk.

final class betty.ancestry.file.File[source]

Bases: ShorthandPluginBase, HasDescription, HasPrivacy, HasLinks, HasMediaType, HasNotes, HasCitations, UserFacingEntity, Entity

A file on disk.

This includes but is not limited to:

  • images

  • video

  • audio

  • PDF documents

__init__(path: Path, *, id: str | None = None, name: str | None = None, media_type: MediaType | None = None, description: ShorthandStaticTranslations | None = None, notes: Iterable[Note] | ToManyResolver[Note] | None = None, citations: Iterable[Citation] | ToManyResolver[Citation] | None = None, privacy: Privacy | None = None, public: bool | None = None, private: bool | None = None, links: MutableSequence[Link] | None = None, copyright_notice: CopyrightNotice | None = None, license: License | None = None)[source]
copyright_notice: CopyrightNotice | None

The copyright notice for this file.

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

Dump this instance to JSON-LD.

property label: Localizable

The entity’s human-readable label.

license: License | None

The license for this file.

async classmethod linked_data_schema(project: Project) JsonLdObject[source]

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

property name: str

The file name.

property path: Path

The file’s path on disk.

classmethod plugin_label_plural() Localizable[source]

The human-readable entity type label, plural.

referees

A bidirectional *-to-many entity type association.