ged2doc.events

Utilities related to individual or family events.

Functions

family_events(family[, tags])

Returns all events for a given family.

indi_attributes(person[, tags])

Returns all attributes for a given individual.

indi_events(person[, tags])

Returns all events for a given individual.

Classes

Event(tag, value, type, date, place, note, cause)

Class representing GEDCOM event structure.

class ged2doc.events.Event(tag: str, value: str, type: str, date: ged4py.model.Date, place: str, note: str, cause: str)[source]

Bases: tuple

Class representing GEDCOM event structure.

This is a reflection of <EVENT_DETAIL>, but only relevant pieces appear in this class.

Attributes
tagstr

Alias for field number 0

valuestr, optional

Alias for field number 1

typestr, optional

Alias for field number 2

dateged4py.model.Date, optional

Alias for field number 3

placestr, optional

Alias for field number 4

notestr, optional

Alias for field number 5

causestr, optional

Alias for field number 6

Methods

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

property tag

GEDCOM tag name for the event.

property value

GEDCOM record value, optional (str or None)

property type

GEDCOM event type, optional (str or None)

property date

Event date, optional (ged4py.model.Date or None)

property place

Place where event happened, optional (str or None)

property note

Arbitrary text note, optional (str or None)

property cause

What caused the event, optional (str or None)

_asdict()

Return a new OrderedDict which maps field names to their values.

_field_defaults = {}
_field_types = {'cause': <class 'str'>, 'date': <class 'ged4py.model.Date'>, 'note': <class 'str'>, 'place': <class 'str'>, 'tag': <class 'str'>, 'type': <class 'str'>, 'value': <class 'str'>}
_fields = ('tag', 'value', 'type', 'date', 'place', 'note', 'cause')
_fields_defaults = {}
classmethod _make(iterable)

Make a new Event object from a sequence or iterable

_replace(**kwds)

Return a new Event object replacing specified fields with new values

ged2doc.events.indi_events(person, tags=None)[source]

Returns all events for a given individual.

Parameters
personged4py.model.Individual

GEDCOM INDI record.

tagslist [ str ], optional

Set of tags to return, default is all event tags.

Returns
eventslist [ Event ]

List of events.

ged2doc.events.indi_attributes(person, tags=None)[source]

Returns all attributes for a given individual.

Parameters
personged4py.model.Individual

GEDCOM INDI record.

tagslist [ str ], optional

Set of tags to return, default is all attribute tags.

Returns
eventslist [ Event ]

List of events.

ged2doc.events.family_events(family, tags=None)[source]

Returns all events for a given family.

Parameters
familyged4py.model.Record

GEDCOM FAM record.

tagslist [ str ], optional

Set of tags to return, default is all attribute tags.

Returns
eventslist [ Event ]

List of events.