Python wrapper to simplify calls to AncestryDNA API.

Overview

AncestryDNA API wrapper

Ancestry exposes an undocumented REST API for its DNA features. This Python wrapper inventories the available calls, and exposes it to novice developers or power users in a more intuitive manner. I have consciously tried to keep the method names and parameters self-explanatory, but included the documentation below if additional context is needed.

Introduction

Many DNA function calls require you to obtain and input GUIDs corresponding to tests and cousin matches. Later revisions of this wrapper might simplify this process, translating human-readable values to their GUIDs.

This wrapper assumes intermediate knowledge of Python -- for example, being able to read the ancestryDnaWrapper class definition, and knowing to input the username and password values to authenticate successfully.

Authentication

Initializing the ancestryDnaWrapper class will automatically perform authentication. It will authenticate the US-based endpoint by default. This can be overrided with the endpoint keyword argument.

Selecting tests

Any of the group, star, and test require a test to be selected. The wrapper will not default to anything.

  • get_tests -- will enumerate all completed tests registered to the account. By default, this will not include any tests shipped, or awaiting processing. To see other tests, change the test_type parameter (default value is complete).
  • use_test -- every object returned from get_tests will include a guid property. That property must be inputted to use any latter options. Like the Ancestry UI, you cannot select more than one test.

Test operations

  • get_dna_matches -- This will return all DNA matches. Every DNA match will contain a testGuid attribute. The method also contains a shared_with_test_id attribute. To obtain shared matches, input testGuid there.
  • get_admixture-- This will return your admixture (e.g. 100% Martian). The method also contains a comparison_guid attribute. To compare admixture with another user, input their testGuid there.

Group operations

  • get_custom_groups -- This will return all custom groups you created. If you do not have any, it will return an empty array. Each object will contain tagId attribute -- required in any delete or modify operations.
  • create_custom_group -- This creates a custom group for you to categorize your matches. Include a name and color value (e.g. #FFFFFF). The response object will include a tagId attribute, needed for addition/deletion operations.
  • delete_custom_group -- deletes group corresponding to the tagId. If creating, and then immediately deleting groups, you may encounter eventual consistency issues. Ensure you wait ~ 30 seconds before attempting operations.
  • modify_group_membership -- add or remove DNA matches to a custom group. Obtain the testGuid from get_dna_matches and the tagId from create/get_custom_group. Action will be add or remove.

Star operation

  • modify_star -- enables you to favorite a match by starring it. Obtain the testGuid from get_dna_matches. Action will be add or remove.
You might also like...
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

Morpheus is a telegram bot that helps to simplify the process of making custom telegram stickers.
Morpheus is a telegram bot that helps to simplify the process of making custom telegram stickers.

😎 Morpheus is a telegram bot that helps to simplify the process of making custom telegram stickers. As you may know, Telegram's official Sti

This repository is used to simplify the process of cloning the SSM documents across the AWS regions.

SSM Cloner Introduction This module is created in order to simplify the process of copying the SSM documents from one region to another regions. As an

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

A Python API wrapper for the Twitter API!

PyTweet PyTweet is an api wrapper made for twitter using twitter's api version 2! Installation Windows py3 -m pip install PyTweet Linux python -m pip

Python API wrapper library for Convex Value API

convex-value-python Python API wrapper library for Convex Value API. Further Links: Convex Value homepage @ConvexValue on Twitter JB on Twitter Authen

Comments
  • Filter error when getting shared matches.

    Filter error when getting shared matches.

    When I try to get use get_dna_matches() it collects my matches fine. When iterate over those and get_dna_matches(shared_with_test_id = match['testGuid']) I get the error ValueError: Filters {'page', 'sortby', 'bookmarkData'} not accepted. See README for valid filter types.

    opened by clm42 2
Owner
Matt
A cloud geek with an interest in serverless development.
Matt
πŸš€ An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
Async client API for the Telegram Group Calls

PyTgCalls This project allow to make Telegram group call with MTProto Api using Pyrogram and WebRTC, this is possible thanks to the power of NodeJS's

null 185 Jan 3, 2023
HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions πŸ’»πŸŒπŸ’‘

aws-iot-shadow-rest-api HTTP Calls to Amazon Web Services Rest API for IoT Core Shadow Actions ?? ?? ?? This simple script implements the following aw

AIIIXIII 3 Jun 6, 2022
Signs API calls to SberCloud.Advanced with AK/SK

sbercloud-api-aksk Signs API calls to SberCloud.Advanced with AK/SK This script is a courtesy of @sadpdtchr Description Sometimes there is a need to m

Peter Predtechensky 1 Nov 30, 2021
Stock market bot that will be used to learn about API calls and database connections.

Stock market bot that will be used to learn about API calls and database connections.

null 1 Dec 24, 2021
hydrotoolbox is a Python script for hydrologic calculations and analysis or by function calls within Python.

hydrotoolbox is a Python script for hydrologic calculations and analysis or by function calls within Python.

Tim Cera 4 Aug 20, 2022
Telegram Group Calls Streaming bot with some useful features, written in Python with Pyrogram and Py-Tgcalls. Supporting platforms like Youtube, Spotify, Resso, AppleMusic, Soundcloud and M3u8 Links.

Yukki Music Bot Yukki Music Bot is a Powerful Telegram Music+Video Bot written in Python using Pyrogram and Py-Tgcalls by which you can stream songs,

Team Yukki 996 Dec 28, 2022
Telegram bot + userbot for streaming audio in group calls.

Calls Music β€” Telegram bot + userbot for streaming audio in group calls ✍?? Requirements FFmpeg Python 3.7+ ?? Deployment ?? Configuration Copy exampl

Calls Music 30 May 17, 2021
Experimental bridges between Telegram calls and other platforms.

Bridges by Calls Music Experimental bridges between Telegram calls and other platforms. Current bridges Bridge 1 (YouTube, Twitch, Facebook, etc...) B

Calls Music 14 Oct 8, 2022
TgMusicBot is a telegram userbot for playing songs in telegram voice calls based on Pyrogram and PyTgCalls.

TgMusicBot [Stable] TgMusicBot is a telegram userbot for playing songs in telegram voice calls based on Pyrogram and PyTgCalls. Commands !start / !hel

Kürşad 21 Dec 25, 2022