racker/python-service-registry-client

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

Homepage:

Size: 313

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Python Rackspace Service Registry client

A Python client for Rackspace Service Registry.

License

This library is distributed under the Apache license.

Usage

 service_registry.client import Client

SPACE_USERNAME = 'username'
SPACE_KEY = 'api key'

nt = Client(RACKSPACE_USERNAME, RACKSPACE_KEY)
Services

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)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.