Skip to main content

Python client for Rackspace Service Registry.

Project description

# 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)
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

service-registry-0.2.0.tar.gz (11.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page