GedcomRootElement¶
- class src.pygedcom.elements.rootElements.rootElement.GedcomRootElement(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomElement
Root element of the Gedcom file.
- Parameters:
level (int) – The level of the element.
xref (str) – The xref of the element.
tag (str) – The tag of the element.
sub_elements (list) – The sub elements of the element.
- Returns:
The root element of the Gedcom file.
- Return type:
RootGedcomElement
- get_xref() str ¶
Get the xref of the root element.
- Returns:
The xref of the root element.
- Return type:
str
- class src.pygedcom.elements.rootElements.head.GedcomHead(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomRootElement
Class for the HEAD element.
- Parameters:
level (int) – The level of the HEAD element.
tag (str) – The tag of the HEAD element.
sub_elements (list) – The sub elements of the HEAD element.
- Returns:
The HEAD element.
- Return type:
- class src.pygedcom.elements.rootElements.individual.GedcomIndividual(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomRootElement
This class represents an individual in the gedcom file.
- Parameters:
level (int) – The level of the individual.
xref (str) – The xref of the individual.
tag (str) – The tag of the individual.
sub_elements (list) – The sub elements of the individual.
- Returns:
The individual.
- Return type:
- get_birth() GedcomCommonEvent ¶
Get the birth of the individual.
- Returns:
The birth of the individual.
- Return type:
- get_death() GedcomCommonEvent ¶
Get the death of the individual.
- Returns:
The death of the individual.
- Return type:
- get_first_name() str ¶
Get the first name of the individual.
- Returns:
The first name of the individual.
- Return type:
str
- get_last_name() str ¶
Get the last name of the individual.
- Returns:
The last name of the individual.
- Return type:
str
- get_media() list ¶
Get the media of the individual.
- Returns:
The media of the individual
- Return type:
list
- get_name() str ¶
Get the name of the individual.
- Returns:
The name of the individual.
- Return type:
str
- get_sex() str ¶
Get the sex of the individual.
- Returns:
The sex of the individual
- Return type:
str
- remove_family(family_xref: str)¶
Remove the family from the individual.
- Parameters:
family_xref (str) – The family xref to remove.
- set_first_name(first_name: str)¶
Set the first name of the individual.
- Parameters:
first_name (str) – The first name of the individual.
- set_last_name(last_name: str)¶
Set the last name of the individual.
- Parameters:
last_name (str) – The last name of the individual.
- set_sex(sex_value: str)¶
Set the sex of the individual. This is not changing family relations.
- Parameters:
sex_value (str) – The sex value of the individual.
- class src.pygedcom.elements.rootElements.family.GedcomFamily(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomRootElement
This class represents a family in the gedcom file.
- Parameters:
level (int) – The level of the family.
xref (str) – The xref of the family.
tag (str) – The tag of the family.
sub_elements (list) – The sub elements of the family.
- Returns:
The family.
- Return type:
- add_child(child_xref: str)¶
Add a child to the family. If child already exists, do nothing.
- Parameters:
child_xref (str) – The xref of the child to add.
- get_children() list ¶
Get the children of the family.
- Returns:
The children of the family.
- Return type:
list
- get_husband() str ¶
Get the husband of the family.
- Returns:
The husband of the family.
- Return type:
str
- get_marriage() GedcomCommonEvent ¶
Get the marriage of the family.
- Returns:
The marriage of the family.
- Return type:
- get_married() bool ¶
Get if the family is married.
- Returns:
True if the family is married, False otherwise.
- Return type:
bool
- get_media() list ¶
Get the media of the family.
- Returns:
The media of the family.
- Return type:
list
- get_parents() list ¶
Get the parents of the family.
- Returns:
The parents of the family.
- Return type:
list
- get_wife() str ¶
Get the wife of the family.
- Returns:
The wife of the family.
- Return type:
str
- remove_child(child_xref: str)¶
Remove a child from the family. If child does not exist, do nothing.
- Parameters:
child_xref (str) – The xref of the child to remove.
- remove_parent(parent_xref: str)¶
Remove a parent from the family. If parent does not exist, do nothing.
- Parameters:
parent_xref (str) – The xref of the parent to remove.
- set_children(children: list)¶
Set the children of the family.
- Parameters:
children (list) – The xrefs of the children.
- set_husband(xref: str)¶
Set the husband of the family.
- Parameters:
xref (str) – The xref of the husband.
- set_wife(xref: str)¶
Set the wife of the family.
- Parameters:
xref (str) – The xref of the wife.
- class src.pygedcom.elements.rootElements.object.GedcomObject(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomRootElement
This class represents an object in the gedcom file.
- Parameters:
level (int) – The level of the Gedcom object.
xref (str) – The xref of the Gedcom object.
tag (str) – The tag of the Gedcom object.
sub_elements (list) – The sub elements of the Gedcom object.
- Returns:
The Gedcom object.
- Return type:
- get_file() str ¶
Get the file path of the Gedcom object.
- Returns:
The file path of the Gedcom object.
- Return type:
str
- get_format() str ¶
Get the format of the Gedcom object.
- Returns:
The format of the Gedcom object.
- Return type:
str
- class src.pygedcom.elements.rootElements.repository.GedcomRepository(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomRootElement
This class represents a repository in the gedcom file.
- Parameters:
level (int) – The level of the Gedcom repository.
xref (str) – The xref of the Gedcom repository.
tag (str) – The tag of the Gedcom repository.
sub_elements (list) – The sub elements of the Gedcom repository.
- Returns:
The Gedcom repository.
- Return type:
- get_name() str ¶
Get the name of the repository.
- Returns:
The name of the repository.
- Return type:
str
- class src.pygedcom.elements.rootElements.source.GedcomSource(level: int, xref: str, tag: str, sub_elements: list)¶
Bases:
GedcomRootElement
The Gedcom source element.
- Parameters:
level (int) – The level of the Gedcom source.
xref (str) – The xref of the Gedcom source.
tag (str) – The tag of the Gedcom source.
sub_elements (list) – The sub elements of the Gedcom source.
- Returns:
The Gedcom source.
- Return type:
- get_media_type() str ¶
Get the media type of the Gedcom source.
- Returns:
The media type of the Gedcom source.
- Return type:
str
- get_note() str ¶
Get the note of the Gedcom source.
- Returns:
The note of the Gedcom source.
- Return type:
str
- get_object() str ¶
Get the object of the Gedcom source.
- Returns:
The object of the Gedcom source.
- Return type:
str
- get_quality() str ¶
Get the quality of the Gedcom source.
- Returns:
The quality of the Gedcom source.
- Return type:
str
- get_repo() str ¶
Get the repository of the Gedcom source.
- Returns:
The repository of the Gedcom source.
- Return type:
str
- get_title() str ¶
Get the title of the Gedcom source.
- Returns:
The title of the Gedcom source.
- Return type:
str
- get_type() str ¶
Get the type of the Gedcom source.
- Returns:
The type of the Gedcom source.
- Return type:
str