Skip to main content

Surveil API Client Library

Project description

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/v2
export SURVEIL_AUTH_URL=http://localhost:8080/v2/auth

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

Bash completion

Basic command tab completion can be enabled by sourcing the bash completion script:

source /usr/local/share/surveil.bash_completion

Python API

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

from surveilclient import client
c = client.Client('http://localhost:8080/v2',
                  auth_url='http://localhost:8080/v2/auth',
                  version='2_0')
hosts = c.config.hosts.list()

How to use it

Config-host-update:

surveil config-host-update [host_name] --address [ADDRESS] --custom_fields '{"_field1": "value1", "_field2": "value2"}'

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

python-surveilclient-0.7.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

python_surveilclient-0.7.0-py2-none-any.whl (47.9 kB view details)

Uploaded Python 2

File details

Details for the file python-surveilclient-0.7.0.tar.gz.

File metadata

File hashes

Hashes for python-surveilclient-0.7.0.tar.gz
Algorithm Hash digest
SHA256 932c898c2b09eec0dfa5516a5dd1689504211b9140145f6cce9eedde15456122
MD5 c4d1001887decf0087bf81aff360dd7f
BLAKE2b-256 a7a6f7cd9762728157b23165a2b19b2d4ee256ff922a422456fe6e3a9e0beca0

See more details on using hashes here.

Provenance

File details

Details for the file python_surveilclient-0.7.0-py2-none-any.whl.

File metadata

File hashes

Hashes for python_surveilclient-0.7.0-py2-none-any.whl
Algorithm Hash digest
SHA256 96880d4b3119edf9cb4a3ab0dced85216bfbcca078d283886b57728e2e3a70d8
MD5 c5d20fc228b6c3d5b7ed1a498eb04fcf
BLAKE2b-256 81cc63bf5f812e27234d11af0c8ac73272d219f783e71b7a071643918e8600b3

See more details on using hashes here.

Provenance

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