Name: python-twisted-keystone-agent
Owner: racker
Description: Twisted Python client for Keystone API.
Created: 2012-08-20 21:37:07.0
Updated: 2013-10-31 00:00:17.0
Pushed: 2013-10-31 00:00:17.0
Size: 147
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
twisted.internet import reactor
twisted.web.client import Agent
txKeystone import KeystoneAgent
t = Agent(reactor)
SPACE_USERNAME = '' # your username here
SPACE_APIKEY = '' # your API key here
_URL = 'https://identity.api.rackspacecloud.com/v2.0/tokens'
tone_agent = KeystoneAgent(agent,
AUTH_URL,
(RACKSPACE_USERNAME, RACKSPACE_APIKEY))
keystone_agent
can now be used like a twisted.web.client.Agent
(see “Receiving Responses“)
to make requests to Rackspace APIs, and the X-Tenant-Id
and X-Auth-Token
headers will be set automatically.