from chalice import Chalice
import random

app = Chalice(app_name='clickstream-data')

@app.route('/user/{phoneNumber}', methods=['GET'])
def index(phoneNumber): # gives a phone number to user name mapping
    userList = {
        "anonymous": "", 
        "architectjobless": "+61428921911",
        "mongoosespots": "+61468457600",
        "typepads": "+61478388994",
        "purrsmunch": "+61448295201",
        "dankishyear": "+61482107117",
        "monstummy": "+61432784228",
        "admiredcrocodiles": "+61414537801",
        "silicajointed": "+61428901833",
        "radiantscold": "+61433354650",
        "approvefeminine": "+61453610894",
        "grunchymole": "+61442806542",
        "ointmentdangly": "+61486624761",
        "paltedquantock": "+61425558428",
        "bashfulpeas": "+61483270375",
        "filletingtekton": "+61422851375",
        "lymphstripey": "+61455336318",
        "industryimmaterial": "+61444809744",
        "comicsynonymous": "+61444182410",
        "chippingrejoice": "+61483483285",
        "ticketpedant": "+61438293837",
        "apricotsflandy": "+61418444598",
        "grainhysterical": "+61443234260",
        "quinoacinnamon": "+61418787400",
        "effectivemixed": "+61449251972",
        "enquiryinventory": "+61449251972",
        "complainoffended": "+61446679164",
        "gustyeland": "+61490486472",
        "rylonkookaburra": "+61423792504",
        "softballpleasant": "+61415563345",
        "serviceeritrean": "+61434898150",
        "ruffbreads": "+61488842748",
        "thoroughdrouse": "+61413408781",
        "rockytaxonomy": "+61426788814",
        "boastbroker": "+61471321703",
        "uranusvapid": "+61457418539",
        "siskinstemson": "+61459968718",
        "nunchingburberry": "+61430933455",
        "henastonished": "+61442669251",
        "tackyspecific": "+61441604202",
        "hearjaundice": "+61445143923",
        "rejectcrucket": "+61459990911",
        "seagullpatches": "+61449341734",
        "immaculateobedient": "+61457121207",
        "hicnicmanager": "+61456340800",
        "anguisheddufus": "+61449130717",
        "pradanonchalant": "+61438542895",
        "vomergills": "+61411122707",
        "viceplaintive": "+61488769680",
        "eyepouldy": "+61469568615",
        "fearattached": "+61441171975",
        "defendedmother": "+61416876161",
        "sneakypale": "+61440494600",
        "snictorwhy": "+61418608341",
        "refereemiscuits": "+61450935301",
        "welcomema": "+61454291203",
        "spongeslide": "+61425309599",
        "pardensneering": "+61418460262",
        "cinemaabnormal": "+61418328540",
        "brooklyncriminal": "+61433101236",
        "boldlateral": "+61476379548",
        "whairhonorable": "+61414856432",
        "needyguilty": "+61435395838",
        "preacherbutterfly": "+61455518530",
        "mouldythine": "+61438509201",
        "knockroasted": "+61426715144",
        "splittingliteral": "+61452863489",
        "yieldclang": "+61413287353",
        "beachsmoker": "+61484720517",
        "slidethinking": "+61421696295",
        "gemboar": "+61445857801",
        "slooktaekwondo": "+61431858291",
        "congolesebuttery": "+61484264824",
        "rosinsaber": "+61418523184",
        "popdiffidence": "+61471123568",
        "movementmoneybag": "+61470982804",
        "prestosoluble": "+61413777363",
        "coinagecomponents": "+61416725378",
        "mimosafilter": "+61415776592",
        "excitingempathic": "+61482939132",
        "invitegumps": "+61439303551",
        "pasternsitemap": "+61480778128"
    }
    for username, phone in userList.items():
        if phone == str(phoneNumber):
            return (username)
from chalice import Chalice
import random

app = Chalice(app_name='clickstream-data')

@app.route('/user/{phoneNumber}', methods=['GET'])
def index(phoneNumber): # gives a phone number to user name mapping
    userList = {
        "anonymous": "", 
        "architectjobless": "+61428921911",
        "mongoosespots": "+61468457600",
        "typepads": "+61478388994",
        "purrsmunch": "+61448295201",
        "dankishyear": "+61482107117",
        "monstummy": "+61432784228",
        "admiredcrocodiles": "+61414537801",
        "silicajointed": "+61428901833",
        "radiantscold": "+61433354650",
        "approvefeminine": "+61453610894",
        "grunchymole": "+61442806542",
        "ointmentdangly": "+61486624761",
        "paltedquantock": "+61425558428",
        "bashfulpeas": "+61483270375",
        "filletingtekton": "+61422851375",
        "lymphstripey": "+61455336318",
        "industryimmaterial": "+61444809744",
        "comicsynonymous": "+61444182410",
        "chippingrejoice": "+61483483285",
        "ticketpedant": "+61438293837",
        "apricotsflandy": "+61418444598",
        "grainhysterical": "+61443234260",
        "quinoacinnamon": "+61418787400",
        "effectivemixed": "+61449251972",
        "enquiryinventory": "+61449251972",
        "complainoffended": "+61446679164",
        "gustyeland": "+61490486472",
        "rylonkookaburra": "+61423792504",
        "softballpleasant": "+61415563345",
        "serviceeritrean": "+61434898150",
        "ruffbreads": "+61488842748",
        "thoroughdrouse": "+61413408781",
        "rockytaxonomy": "+61426788814",
        "boastbroker": "+61471321703",
        "uranusvapid": "+61457418539",
        "siskinstemson": "+61459968718",
        "nunchingburberry": "+61430933455",
        "henastonished": "+61442669251",
        "tackyspecific": "+61441604202",
        "hearjaundice": "+61445143923",
        "rejectcrucket": "+61459990911",
        "seagullpatches": "+61449341734",
        "immaculateobedient": "+61457121207",
        "hicnicmanager": "+61456340800",
        "anguisheddufus": "+61449130717",
        "pradanonchalant": "+61438542895",
        "vomergills": "+61411122707",
        "viceplaintive": "+61488769680",
        "eyepouldy": "+61469568615",
        "fearattached": "+61441171975",
        "defendedmother": "+61416876161",
        "sneakypale": "+61440494600",
        "snictorwhy": "+61418608341",
        "refereemiscuits": "+61450935301",
        "welcomema": "+61454291203",
        "spongeslide": "+61425309599",
        "pardensneering": "+61418460262",
        "cinemaabnormal": "+61418328540",
        "brooklyncriminal": "+61433101236",
        "boldlateral": "+61476379548",
        "whairhonorable": "+61414856432",
        "needyguilty": "+61435395838",
        "preacherbutterfly": "+61455518530",
        "mouldythine": "+61438509201",
        "knockroasted": "+61426715144",
        "splittingliteral": "+61452863489",
        "yieldclang": "+61413287353",
        "beachsmoker": "+61484720517",
        "slidethinking": "+61421696295",
        "gemboar": "+61445857801",
        "slooktaekwondo": "+61431858291",
        "congolesebuttery": "+61484264824",
        "rosinsaber": "+61418523184",
        "popdiffidence": "+61471123568",
        "movementmoneybag": "+61470982804",
        "prestosoluble": "+61413777363",
        "coinagecomponents": "+61416725378",
        "mimosafilter": "+61415776592",
        "excitingempathic": "+61482939132",
        "invitegumps": "+61439303551",
        "pasternsitemap": "+61480778128"
    }
    for username, phone in userList.items():
        if phone == str(phoneNumber):
            return (username)
# gives a phone number to user name mapping