Skip to main content

FastGedcom

A lightweight tool to parse, browse and edit gedcom files.

Install FastGedcom using pip from its PyPI page:

pip install fastgedcom

Features

Easy to write! Free choice of fields, data, and formatting.

from fastgedcom.parser import strict_parse
from fastgedcom.helpers import format_date

document = strict_parse("gedcom_file.ged")

birth_date = (document["@I1@"] > "BIRT") >= "DATE"
print(format_date(birth_date))

The syntax is flexible and permissive. If you don't like magic operator overloads, you can use standard methods!

It supports gedcom files encoded in UTF-8 (with and without BOM), UTF-16 (also named UNICODE), ANSI, and ANSEL.

If a field is missing, you will get a FakeLine containing an empty string. This help reducing the boiler plate code massively. And, you can differentiate a TrueLine from a FakeLine with a simple boolean check.

indi = document["@I13@"]
death = indi > "DEAT"
if not death:
	print("No DEAT field. The person is alive")
# Can continue anyway
print("Death date:", format_date((indi > "DEAT") >= "DATE"))

Typehints for salvation! Autocompletion and type checking make development so much easier.

Why FastGedcom ?

FastGedcom's aim is to keep the code close to your gedcom files. So, you don't have to learn what FastGedcom does, the data you have, is the data you get. The content of the gedcom file is unchanged. The data processing is optional to best suit your needs. FastGedcom is more of a starting point of your data processing than a all-round full-featured librairy.

The name FastGedcom doesn't just come from its ease of use. Parsing is really fast. And, for getting the relatives of a person as fast as possible, there is the FamilyLink class. Here are the benchmark I used.

Documentation and examples

Want to see more code? Here are some examples

The documentation of FastGedcom is available here on ReadTheDocs.

Feedback

Feedback are welcome, and they will be greatly appreciated!

If you like this project, consider putting a star on Github, thank you!

For any feedback or question, please feel free to contact me by email at gatien.bouyer.dev@gmail.com or via Github issues.

Metadata

Release files for fastgedcom 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastgedcom 1.0.0
File Size Uploaded
fastgedcom-1.0.0.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastgedcom 1.0.0
File Interpreter ABI Platform
fastgedcom-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.6 kB

Release files / fastgedcom-1.0.0.tar.gz

Download URL fastgedcom-1.0.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7bcf87ab76e6f88e9794c1fee98bfbe586efa4aca569fe83c16a63cbe1fb9fc7
BLAKE2b-256 checksum
How to use checksums
4f4eb3b7beef16c8cf7613cdc61064ad61b4ffe63fff2f012d3245f05cd28508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / fastgedcom-1.0.0-py3-none-any.whl

Download URL fastgedcom-1.0.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
224a398429583b7a627e3732438039a457e532dd87ebcf495cbc0a22fd321bcc
BLAKE2b-256 checksum
How to use checksums
950b26702914582d0d43fe259b1d00f27ba802c0640ee0b9ef31b5d532808858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

This release

1.0.0 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page