😆
The requests.session and CheckmateClient stuff I wrote does this exact thing under the hood.
from pawn import client
from pawn.rackspace import AuthRackspaceIdentity, AuthRacker
api = client.CheckmateClient()
racker = AuthRacker('username', 'password')
api.auth.register(racker)
# or you could use the shortcut, api = racker.create_client()
# and for any cloud account
cloud = AuthRackspaceIdentity('apikey')
api.auth.register(cloud)