Skip to content

by-cx/lobby-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lobby-python

This is a simple wrapper for Lobby's REST API interface that allows to list discovered servers and their labels and also update labels of the destination instance.

Check Lobby for more information.

Installation

pip install lobby-python

Example

from lobby import Lobby
import json

lobby = Lobby(host="localhost", port=1313, token="", proto="http")

response = lobby.add_labels(["service:ns", "service:smtp", "service:node", "backup:/srv/apps", "backup:/etc"])
print(response)

response = lobby.delete_labels(["service:node"])
print(response)

response = lobby.get_discovery()
print(json.dumps(response, indent=2))

response = lobby.get_discoveries()
print(json.dumps(response, indent=2))

About

Client for service discovery tool Lobby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published