Skip to content

Instantly share code, notes, and snippets.

@epequeno
Created September 24, 2014 19:36
Show Gist options
  • Save epequeno/90e8dea4b8004179c3fd to your computer and use it in GitHub Desktop.
Save epequeno/90e8dea4b8004179c3fd to your computer and use it in GitHub Desktop.
rax api stuff
import requests
auth_url = "https://identity.api.rackspacecloud.com/v2.0/tokens"
json_header = {"Content-Type" : "application/json"}
auth = open("auth.json").read()
req = requests.post(auth_url, data=auth, headers=json_header)
print req.json()['access']['token']['id']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment