Name: python-service-registry-client
Owner: racker
Description: Python client for Rackspace Service Registry.
Created: 2012-09-11 20:30:24.0
Updated: 2013-10-06 20:16:18.0
Pushed: 2013-04-01 15:41:56.0
Size: 313
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A Python client for Rackspace Service Registry.
This library is distributed under the Apache license.
service_registry.client import Client
SPACE_USERNAME = 'username'
SPACE_KEY = 'api key'
nt = Client(RACKSPACE_USERNAME, RACKSPACE_KEY)
Create a service with a heartbeat timeout of 10:
ice_id = 'my-service-1'
oad = {'metadata': {'key': 'value'}}
tbeat_timeout = 10
nt.services.create(service_id, heartbeat_timeout, payload)
Heartbeat a service:
ice_id = 'my-service-1'
n = 'returned-heartbeat-token'
nt.services.heartbeat(service_id, token)