Welcome to the Family Echo Q&A forum. In order to ask or answer questions, please ensure you sign in at Family Echo first.
Welcome to Family Echo Q&A, where you can ask questions and receive answers from other members of the community.

In order to ask or answer questions, please ensure you sign in at Family Echo first.

Before asking a question, please check the Frequently Asked Questions page.

How to use Family Eecho api with py

0 votes
346 views
asked Sep 29, 2022 by Flow_Glow (150 points)

1 Answer

+1 vote
With Python? Here's some example code:

#
# first install requests from the command line: python -m pip install requests
#

import requests

def main():
    format = 'json'
    operation = 'temp_view'
    family = sample_GEDCOM_file()

    url = 'https://www.familyecho.com/api/'
    payload = {'format': format, 'operation': operation, 'family': family}

    response = requests.post(url, data=payload)

    print(response.text)

    
def sample_GEDCOM_file():
    return """
0 HEAD
1 SOUR Family Echo
2 WWW http://www.familyecho.com/
1 FILE Family 28
1 DATE 1 OCT 2022
1 DEST ANSTFILE
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
1 SUBM @I1@
2 NAME Lloyd Sommerer
1 SUBN
1 CHAR UTF-8
0 @I1@ INDI
1 NAME Lloyd /Sommerer/
2 GIVN Lloyd
2 NSFX Jr.
2 SURN Sommerer
2 _MARNM Sommerer
1 FAMC @F1@
0 @I2@ INDI
1 NAME Lloyd /Sommerer/
2 GIVN Lloyd
2 NSFX Sr.
2 SURN Sommerer
2 _MARNM Sommerer
1 SEX M
1 FAMS @F1@
0 @I3@ INDI
1 NAME Jane /Sommerer/
2 GIVN Jane
2 SURN Sommerer
2 _MARNM Sommerer
1 SEX F
1 FAMS @F1@
0 @F1@ FAM
1 HUSB @I2@
1 WIFE @I3@
1 CHIL @I1@
1 _CURRENT Y
1 _PRIMARY Y
0 TRLR
"""

main()
answered Oct 5, 2022 by lsommerer (51,650 points)
Thank you. Do you know anyway how to convert SQLite DBs to GEDCOM
Most people use a program like Family Echo so that they don't have to edit GEDCOM files. Where is the database coming from? What data is in it?
...