Skip to main content

gramps-gedcom7

A GEDCOM 7 import and export library for Gramps.

Project Status

The library provides comprehensive GEDCOM 7 import functionality. The implementation covers the vast majority of features and has been successfully tested with real-world files. While suitable for production use, users should verify results as with any conversion tool.

Export is newer than import. Every test file survives a round trip unchanged, but the researcher recorded in the database is not yet written.

Installation

To install the library, simply run:

python -m pip install gramps-gedcom7

Gramps 6.0 or newer is required, but is not installed automatically. Install it with python -m pip install "gramps>=6.0.0".

Usage as command-line tool

The tool can be used to convert a GEDCOM 7 file to a Gramps XML file on the command line. The command is:

python -m gramps_gedcom7.gedcom2xml path/to/input.ged path/to/output.gramps

Instead of an output file name, you can also specify - to write the output to standard output.

Usage as a library

from gramps.gen.db.utils import make_database
from gramps_gedcom7 import import_gedcom, export_gedcom

db = make_database("sqlite")
db.load("/path/to/grampsdb/<id>")

import_gedcom("input.ged", db)
export_gedcom(db, "output.ged")

db is a Gramps database: DbWriteBase to import into, DbReadBase to export from.

Both return a Report of what was left out; report.messages() lists it as text. Both take progress, a callable given how much is done and the total.

import_gedcom raises BrokenPointersError for pointers to records missing from the file; ImportSettings(void_broken_pointers=True) imports it anyway.

export_gedcom raises MissingObjectsError for references to objects missing from the database. It validates the dataset before writing and raises ExportValidationError if it does not conform; pass validate=False to write anyway.

GEDZIP

from gramps_gedcom7 import import_gedzip, export_gedzip

import_gedzip("input.gdz", db)
export_gedzip(db, "output.gdz", media_file)

Each file in the archive is named after its media object's path, which must be relative. import_gedzip gives media objects those names and stores no files. media_file(media) gives the file as bytes, a path, or a function opening it, or None if it is unavailable.

Usage as Gramps plugin

The tool cannot be used as a Gramps plugin yet, since its interaction with the Gedcom 5 core plugin is not clarified. See this thread for the discussion.

Web interface

A Streamlit web interface is available for interactive use at gramps-gedcom7.streamlit.app.

You can also run it locally:

python -m gramps_gedcom7.web

This opens a web browser where you can upload GEDCOM 7 files and download the converted Gramps XML files.

Metadata

Release files for gramps-gedcom7 0.6.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 gramps-gedcom7 0.6.0
File Size Uploaded Provenance Actions
gramps_gedcom7-0.6.0.tar.gz 121.2 kB With provenance Details for gramps_gedcom7-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gramps-gedcom7 0.6.0
File Interpreter ABI Platform Actions
gramps_gedcom7-0.6.0-py3-none-any.whl Python 3 none any Details for gramps_gedcom7-0.6.0-py3-none-any.whl

Total release size: 197.1 kB

Release files / gramps_gedcom7-0.6.0.tar.gz

Download URL gramps_gedcom7-0.6.0.tar.gz
Size 121.2 kB
Tags Source
SHA-256 checksum
How to use checksums
402ae5fe145319892aa40179e32fc9515477656040512155582686bdf2d251eb
BLAKE2b-256 checksum
How to use checksums
1c5421eb4aef4e5907053f3a71ae1a3a15f310c70891a6d71eb70673d5e28ec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / gramps_gedcom7-0.6.0-py3-none-any.whl

Download URL gramps_gedcom7-0.6.0-py3-none-any.whl
Size 75.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91b63f3deb6a39a26f93546dd3acfeabbeed245a05c4a6cecce019f0cff3c4a9
BLAKE2b-256 checksum
How to use checksums
3cbb35b97a5fd873f8b3c713a79fe45ff734fea686a4d7acf221bc86a806196b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for gramps-gedcom7 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gramps_gedcom7-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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