skip to navigation
skip to content

Not Logged In

service-registry 0.2.0

Python client for Rackspace Service Registry.

# Python Rackspace Service Registry client

A Python client for Rackspace Service Registry.

# License

This library is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).

# Usage

```Python
from service_registry import Client

RACKSPACE_USERNAME = 'username'
RACKSPACE_KEY = 'api key'

client = Client(RACKSPACE_USERNAME, RACKSPACE_KEY)
```

## Services

Create a service with a heartbeat timeout of 10:

```Python
service_id = 'my-service-1'
payload = {'metadata': {'key': 'value'}}
heartbeat_timeout = 10

client.services.create(service_id, heartbeat_timeout, payload)
```

Heartbeat a service:

```Python
service_id = 'my-service-1'
token = 'returned-heartbeat-token'

client.services.heartbeat(service_id, token)
```
 
File Type Py Version Uploaded on Size
service-registry-0.2.0.tar.gz (md5) Source 2013-03-20 10KB
  • Downloads (All Versions):
  • 18 downloads in the last day
  • 178 downloads in the last week
  • 621 downloads in the last month