Skip to main content

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

Project description

FastGedcom

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

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 reduces the boiler plate code. You can differentiate FakeLine and TrueLine 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 for you. The content of your gedcom file is what you get. The data processing is optional to best suit your needs.

The name FastGedcom doesn't just come from its ease of use. Getting relatives can be done quickly. That's what the FamilyLink class is all about. 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.

Feedbacks

Feedbacks 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastgedcom-0.0.6.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

fastgedcom-0.0.6-py3-none-any.whl (14.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page