A GEDCOM 7 parser for Python.
The parser is based on regular expressions generated directly from the ABNF grammar via abnf-to-regexp
. It does not attempt to parse files that are not standards compliant.
python -m pip install gedcom7
import gedcom7
with open("my_gedcom.ged", "r", encoding="utf-8") as f:
string = f.read()
records = gedcom7.loads(string)
Inspiration was drawn from the Javascript parser.