GEDCOM v5 parser
Project description
GEDCOM v5
Parser for GEDCOM v5 files
Specifications
https://www.gedcom.org/gedcom.html
Samples
https://www.gedcom.org/samples.html
Usage Example
from gedcom5.parser import GEDCOM5Parser
msg = '\n'.join([
'0 @I1@ INDI',
'1 NAME Bob /BROWN/',
'2 FAMC @F1@',
'0 @F1@ FAM',
'1 HUSB @I2@',
'1 WIFE @I3@',
'0 @I2@ INDI',
'1 NAME Mary /BROWN/',
'1 NAME Mary /MARTIN/',
'0 @I3@ INDI',
'1 NAME Mary /SMITH/',
])
parser = GEDCOM5Parser()
gedcom = parser.parse_string(msg)
assert gedcom.indi[0].name[0].value == 'Bob /BROWN/'
expected = ['1 NAME Bob /BROWN/', '1 NAME Mary /BROWN/', '1 NAME Mary /SMITH/']
for index, indi in enumerate(gedcom.indi):
assert f'{indi.name[0]}' == expected[index]
assert f'{gedcom.indi[1].name[1]}' == '1 NAME Mary /MARTIN/'
assert gedcom.indi[1].name[1].value == 'Mary /MARTIN/'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gedcom5-0.2.0.tar.gz
(18.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
gedcom5-0.2.0-py3-none-any.whl
(14.2 kB
view details)
File details
Details for the file gedcom5-0.2.0.tar.gz.
File metadata
- Download URL: gedcom5-0.2.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16abd233b254b7c223d1ecdb62f5bf549eedbc7afb7ebdcea912bc5eebe99246
|
|
| MD5 |
457408cd8206b21fc28d513a8ef2067f
|
|
| BLAKE2b-256 |
a240be95a6ac45380216fc27c37cb6720c107d117b0c5e25fcdc9027c333a302
|
File details
Details for the file gedcom5-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gedcom5-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
438bbd3e09be06a63ac0f06600ef6dffec3ae771f402d0f20428504f1994b8d0
|
|
| MD5 |
778f3e22c7bc72721760a966c650e69a
|
|
| BLAKE2b-256 |
fd7214eb01406035003faa0b6f51dadd9969184b2e0101cd53f7a009c68f1413
|