aviau ec946e1df3 Documented CLI in README
Change-Id: I5c7142c6c3eb370c8896249fa15e37e0bf9b27a4
2014-12-21 15:54:43 -05:00

786 B

Python bindings to the Surveil API

This is a client library for Surveil built on the Surveil API.

Command-line API

Installing this package gets you a shell command, surveil, that you can use to interact with the Surveil API.

You'll need to provide the Surveil API URL. You can do this with the --surveil-api-url parameter, but it's easier to just set it as environment variable:

export SURVEIL_API_URL=http://localhost:8080/v1

You'll find complete documentation on the shell by running surveil help.

Python API

To use the python API, simply create a client with the endpoint:

from surveilclient.v1_0 import client
c = client.Client('http://localhost:8080/v1')
hosts = c.hosts.list()