ged2doc.events¶
Utilities related to individual or family events.
Functions
|
Returns all events for a given family. |
|
Returns all attributes for a given individual. |
|
Returns all events for a given individual. |
Classes
|
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
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
orNone
)
-
property
type
¶ GEDCOM event type, optional (
str
orNone
)
-
property
date
¶ Event date, optional (
ged4py.model.Date
orNone
)
-
property
place
¶ Place where event happened, optional (
str
orNone
)
-
property
note
¶ Arbitrary text note, optional (
str
orNone
)
-
property
cause
¶ What caused the event, optional (
str
orNone
)
-
_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
- person
ged4py.model.Individual
GEDCOM INDI record.
- tags
list
[str
], optional Set of tags to return, default is all event tags.
- person
- Returns
- events
list
[Event
] List of events.
- events