import httpx12import asyncio3import sys45from ghunt.apis.peoplepa import PeoplePaHttp6from ghunt.objects.base import GHuntCreds789async def main():10if not sys.argv[1:]:11exit("Please give an email address.")12email = sys.argv[1]1314ghunt_creds = GHuntCreds()15ghunt_creds.load_creds() # Check creds (but it doesn't crash if they are invalid)1617as_client = httpx.AsyncClient() # Async client1819people_api = PeoplePaHttp(ghunt_creds)20found, person = await people_api.people_lookup(as_client, email, params_template="just_name")21# You can have multiple "params_template" for the GHunt APIs,22# for example, on this endpoint, you have "just_gaia_id" by default,23# "just_name" or "max_details" which is used in the email CLI module.2425print("Found :", found)26if found:27if "PROFILE" in person.names: # A specification of People API, there are different containers28# A target may not exists globally, but only in your contacts,29# so it will show you only the CONTACT container,30# with the informations you submitted.31# What we want here is the PROFILE container, with public infos.3233print("Name :", person.names["PROFILE"].fullname)34else:35print("Not existing globally.")3637asyncio.run(main()) # running our async code in a non-async code3839