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.

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.

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-1.0.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastgedcom-1.0.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file fastgedcom-1.0.0.tar.gz.

File metadata

  • Download URL: fastgedcom-1.0.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for fastgedcom-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7bcf87ab76e6f88e9794c1fee98bfbe586efa4aca569fe83c16a63cbe1fb9fc7
MD5 f395f54e9ecfa7c955f750a3910eedee
BLAKE2b-256 4f4eb3b7beef16c8cf7613cdc61064ad61b4ffe63fff2f012d3245f05cd28508

See more details on using hashes here.

File details

Details for the file fastgedcom-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: fastgedcom-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for fastgedcom-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 224a398429583b7a627e3732438039a457e532dd87ebcf495cbc0a22fd321bcc
MD5 f6590ceed936caf4a1b2b52d891815b5
BLAKE2b-256 950b26702914582d0d43fe259b1d00f27ba802c0640ee0b9ef31b5d532808858

See more details on using hashes here.

Supported by

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