Skip to main content

Python client for the Serf orchestration tool

Project description

The Python interface to Serf, the decentralised solution for service discovery and orchestration.

Travis-CI badge Gemnasium badge PyPI latest version badge Code coverage badge

Installation

serfclient requires a running Serf agent. See Serf’s agent documentation for instructions.

To install serfclient, run the following command:

$ pip install serfclient

or alternatively (you really should be using pip though):

$ easy_install serfclient

or from source:

$ python setup.py install

Getting Started

from contextlib import closing
from serfclient.client import SerfClient

with closing(SerfClient()) as client:
    client.event('foo', 'bar')

Stream usage:

from contextlib import closing
from serfclient.client import SerfClient

with closing(SerfClient(timeout=None)) as client:
    for response in client.stream('*').body:
        print(response)

Development

serfclient requires a running Serf agent. See Serf’s agent documentation for instructions.

You can run the tests using the following commands:

$ serf agent --tag foo=bar  # start serf agent
$ python setup.py test

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

serfclient-1.2.0.tar.gz (5.4 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