betty.entities.file module

Data types representing files on disk.

final class betty.entities.file.File

Bases: HasDescription, HasPrivacy, HasLinks, HasMediaType, HasNotes, HasCitations

The file entity plugin.

Plugin ID

file

Class

File

Configuration

not configurable

__init__(path: StrPath, *, id: str | None = None, name: str | None = None, media_type: ResolvableMediaType | None = None, description: ResolvableLocalizable | None = None, notes: ToManyAssociates[Note] = (), citations: ToManyAssociates[Citation] = (), privacy: Privacy = Privacy.UNDETERMINED, links: ToManyAssociates[Link] = (), copyright_notice: CopyrightNotice | None = None, license: License | None = None)
copyright_notice: CopyrightNotice | None

The copyright notice for this file.

async dump_linked_data(project: Project, /) PortableMapping

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

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

property name: str

The file name.

path

The file’s path on disk.

referees

Other entities referencing this file.