upload_files.py
def login(server_path, email, password):
    """Generic login function. Returns cookie and auth token for Raptor Maps
    Arguments:
        server_path (str): e.g. https://app.raptormaps.com
        email (str): e.g. gavinbelson@raptormaps.com
        password (str): e.g. 123456789
    Returns:
        {session: (hashed_session_string)}, <auth_token> (str)
    """

    data = {"email":str(email),"password":str(password)}

    login_path = server_path + '/login'
    headers = {"Content-Type": "application/json"}

    r = requests.post(login_path, headers=headers, data=json.dumps(data))

    # find the session cookie
    for c in r.cookies:
        if c.name == 'session':
            cookie = {c.name: c.value}

    response = r.json()

    auth_token = response["response"]["user"]["authentication_token"]

    return cookie, auth_token
Generic login function. Returns cookie and auth token for Raptor Maps
    Arguments:
        server_path (str): e.g. https://app.raptormaps.com
        email (str): e.g. gavinbelson@raptormaps.com
        password (str): e.g. 123456789
    Returns:
        {session: (hashed_session_string)}, <auth_token> (str)
    
Generic login function. Returns cookie and auth token for Raptor Maps
Generic login function . Returns cookie and auth token for Raptor Maps
def login(server_path, email, password):
    data = {"email":str(email),"password":str(password)}
    login_path = server_path + '/login'
    headers = {"Content-Type": "application/json"}
    r = requests.post(login_path, headers=headers, data=json.dumps(data))
    for c in r.cookies:
        if c.name == 'session':
            cookie = {c.name: c.value}
    response = r.json()
    auth_token = response["response"]["user"]["authentication_token"]
    return cookie, auth_token
def login ( server_path , email , password ) : data = { "email" : str ( email ) , "password" : str ( password ) } login_path = server_path + '/login' headers = { "Content-Type" : "application/json" } r = requests . post ( login_path , headers = headers , data = json . dumps ( data ) ) for c in r . cookies : if c . name == 'session' : cookie = { c . name : c . value } response = r . json ( ) auth_token = response [ "response" ] [ "user" ] [ "authentication_token" ] return cookie , auth_token
Generic login function.
Generic login function .
"""Generic login function. Returns cookie and auth token for Raptor Maps
    Arguments:
        server_path (str): e.g. https://app.raptormaps.com
        email (str): e.g. gavinbelson@raptormaps.com
        password (str): e.g. 123456789
    Returns:
        {session: (hashed_session_string)}, <auth_token> (str)
    """ # find the session cookie
None
{session
server_path
None
email
None
password
None