Python 2.7 - unable to set/get a session cookie value

I keep going in circles on trying to save a cookie and get its value but I keep getting errors. It seems to save the cookie with the following code:

    account = "Mario"
    
    session = requests.Session()
    
    session.post("http://127.0.0.1")
    
    cookie_obj = requests.cookies.create_cookie(domain='127.0.0.1', name='account', value=account)
    
    session.cookies.set_cookie(cookie_obj)

Then when I try to get the cookie it just prints { }:

    import requests
    
    session = requests.Session()
    
    request = session.get("http://127.0.0.1")
    
    print(session.cookies.get_dict())

Am I missing something? I found too many websites with too many suggestions