You need to use a session object and send the authentication each request. The session will also track cookies for you:
session = requests.Session()
session.auth = (user, password)
auth = session.post('http://' + hostname)
response = session.get('http://' + hostname + '/rest/applications')