Metadata-Version: 2.4
Name: gedcomkit
Version: 0.1.2
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Sociology :: Genealogy
License-File: LICENSE
Summary: An archival-grade GEDCOM library: byte-preserving round-trip, encoding detection and reporting, GEDCOM 5.5 through 7.x, GEDZIP. Rust core, Python bindings.
Keywords: gedcom,genealogy,parser,family-tree,gedzip
License-Expression: AGPL-3.0-or-later
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# gedcomkit (Python)

Python bindings for **gedcomkit**, an archival-grade GEDCOM library written
in Rust: byte-preserving round-trip, encoding detection and reporting,
GEDCOM 5.5 through 7.x. A node no caller touched is written back byte for
byte; nothing is dropped for being unrecognized; hostile input is bounded.

```python
import gedcomkit

doc = gedcomkit.Gedcom.parse(open("family.ged", "rb").read())
print(doc.encoding)          # "Read as ANSEL, declared ANSEL"
print(len(doc), doc.version)

for person in doc.individuals():
    print(person["names"], person["events"])

for finding in doc.validate():
    print(finding["severity"], finding["message"])

# The family graph reads both directions of the link, so a one-sided
# file (FAMC only, no CHIL) still answers.
print(doc.parents_of("@I3@"))

# Edit one structure by the path its view carries; every untouched
# line still writes back byte for byte.
doc.set_logical_value("@I1@", [0], "Ada /Lovelace/")
open("family.ged", "wb").write(doc.to_bytes())
```

Build from this directory with [maturin](https://maturin.rs):

```
maturin develop          # into the active virtualenv
maturin build --release  # a wheel
```

The Rust core lives at the root of the same repository; this crate
is a thin PyO3 layer over its public API.

License: AGPL-3.0-or-later, the same as the core (see LICENSE).

