fastgedcom


Namefastgedcom JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryA lightweight tool to parse, browse and edit gedcom files.
upload_time2023-07-28 18:57:19
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License
keywords fastgedcom gedcom parser genealogy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastGedcom

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

Install FastGedcom using pip from [its PyPI page](https://pypi.org/project/fastgedcom/):
```bash
pip install fastgedcom
```

## Features
Easy to write! Free choice of fields, data, and formatting.
```python
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](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FakeLine) containing an empty string. This help reducing the boiler plate code massively. And, you can differentiate a [TrueLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.TrueLine) from a [FakeLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FakeLine) with a simple boolean check.
```python

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.

- There are only 3 main classes: [Document](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.Document), [TrueLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.TrueLine), and [FakeLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FakeLine).
- There are type aliases for code clarity: [Record](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.Record), [XRef](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.XRef), [IndiRef](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.IndiRef), [FamRef](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FamRef), and more.

## 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](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/family_link/index.html#fastgedcom.family_link.FamilyLink) class. [Here](https://github.com/GatienBouyer/fastgedcom/tree/main/benchmarks) are the benchmark I used.

## Documentation and examples

Want to see more code? [Here are some examples](https://github.com/GatienBouyer/fastgedcom/tree/main/examples)

The documentation of FastGedcom is available [here](https://fastgedcom.readthedocs.io/en/latest/) on ReadTheDocs.

## Feedback

Feedback are welcome, and they will be greatly appreciated!

If you like this project, consider putting a star on [Github](https://github.com/GatienBouyer/fastgedcom), 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](https://github.com/GatienBouyer/fastgedcom/issues).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "fastgedcom",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "fastgedcom,gedcom,parser,genealogy",
    "author": "",
    "author_email": "Gatien Bouyer <gatien.bouyer.dev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/4f/4e/b3b7beef16c8cf7613cdc61064ad61b4ffe63fff2f012d3245f05cd28508/fastgedcom-1.0.0.tar.gz",
    "platform": null,
    "description": "# FastGedcom\r\n\r\nA lightweight tool to parse, browse and edit gedcom files.\r\n\r\nInstall FastGedcom using pip from [its PyPI page](https://pypi.org/project/fastgedcom/):\r\n```bash\r\npip install fastgedcom\r\n```\r\n\r\n## Features\r\nEasy to write! Free choice of fields, data, and formatting.\r\n```python\r\nfrom fastgedcom.parser import strict_parse\r\nfrom fastgedcom.helpers import format_date\r\n\r\ndocument = strict_parse(\"gedcom_file.ged\")\r\n\r\nbirth_date = (document[\"@I1@\"] > \"BIRT\") >= \"DATE\"\r\nprint(format_date(birth_date))\r\n```\r\n\r\nThe syntax is flexible and permissive. If you don't like magic operator overloads, you can use standard methods!\r\n\r\nIt supports gedcom files encoded in UTF-8 (with and without BOM), UTF-16 (also named UNICODE), ANSI, and ANSEL.\r\n\r\nIf a field is missing, you will get a [FakeLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FakeLine) containing an empty string. This help reducing the boiler plate code massively. And, you can differentiate a [TrueLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.TrueLine) from a [FakeLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FakeLine) with a simple boolean check.\r\n```python\r\n\r\nindi = document[\"@I13@\"]\r\ndeath = indi > \"DEAT\"\r\nif not death:\r\n\tprint(\"No DEAT field. The person is alive\")\r\n# Can continue anyway\r\nprint(\"Death date:\", format_date((indi > \"DEAT\") >= \"DATE\"))\r\n```\r\n\r\nTypehints for salvation! Autocompletion and type checking make development so much easier.\r\n\r\n- There are only 3 main classes: [Document](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.Document), [TrueLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.TrueLine), and [FakeLine](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FakeLine).\r\n- There are type aliases for code clarity: [Record](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.Record), [XRef](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.XRef), [IndiRef](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.IndiRef), [FamRef](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/base/index.html#fastgedcom.base.FamRef), and more.\r\n\r\n## Why FastGedcom ?\r\n\r\nFastGedcom'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.\r\n\r\nThe 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](https://fastgedcom.readthedocs.io/en/latest/autoapi/fastgedcom/family_link/index.html#fastgedcom.family_link.FamilyLink) class. [Here](https://github.com/GatienBouyer/fastgedcom/tree/main/benchmarks) are the benchmark I used.\r\n\r\n## Documentation and examples\r\n\r\nWant to see more code? [Here are some examples](https://github.com/GatienBouyer/fastgedcom/tree/main/examples)\r\n\r\nThe documentation of FastGedcom is available [here](https://fastgedcom.readthedocs.io/en/latest/) on ReadTheDocs.\r\n\r\n## Feedback\r\n\r\nFeedback are welcome, and they will be greatly appreciated!\r\n\r\nIf you like this project, consider putting a star on [Github](https://github.com/GatienBouyer/fastgedcom), thank you!\r\n\r\nFor any feedback or question, please feel free to contact me by email at gatien.bouyer.dev@gmail.com or via [Github issues](https://github.com/GatienBouyer/fastgedcom/issues).\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A lightweight tool to parse, browse and edit gedcom files.",
    "version": "1.0.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/GatienBouyer/fastgedcom/issues",
        "Documentation": "https://fastgedcom.readthedocs.io/en/latest/",
        "Source": "https://github.com/GatienBouyer/fastgedcom"
    },
    "split_keywords": [
        "fastgedcom",
        "gedcom",
        "parser",
        "genealogy"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "950b26702914582d0d43fe259b1d00f27ba802c0640ee0b9ef31b5d532808858",
                "md5": "f6590ceed936caf4a1b2b52d891815b5",
                "sha256": "224a398429583b7a627e3732438039a457e532dd87ebcf495cbc0a22fd321bcc"
            },
            "downloads": -1,
            "filename": "fastgedcom-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f6590ceed936caf4a1b2b52d891815b5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 14531,
            "upload_time": "2023-07-28T18:57:17",
            "upload_time_iso_8601": "2023-07-28T18:57:17.820400Z",
            "url": "https://files.pythonhosted.org/packages/95/0b/26702914582d0d43fe259b1d00f27ba802c0640ee0b9ef31b5d532808858/fastgedcom-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f4eb3b7beef16c8cf7613cdc61064ad61b4ffe63fff2f012d3245f05cd28508",
                "md5": "f395f54e9ecfa7c955f750a3910eedee",
                "sha256": "7bcf87ab76e6f88e9794c1fee98bfbe586efa4aca569fe83c16a63cbe1fb9fc7"
            },
            "downloads": -1,
            "filename": "fastgedcom-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f395f54e9ecfa7c955f750a3910eedee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 19081,
            "upload_time": "2023-07-28T18:57:19",
            "upload_time_iso_8601": "2023-07-28T18:57:19.672067Z",
            "url": "https://files.pythonhosted.org/packages/4f/4e/b3b7beef16c8cf7613cdc61064ad61b4ffe63fff2f012d3245f05cd28508/fastgedcom-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-28 18:57:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GatienBouyer",
    "github_project": "fastgedcom",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fastgedcom"
}
        
Elapsed time: 0.10058s